The objectives of this study were to develop and optimize ultrasound‐assisted extraction (UAE) for shikonin from Arnebia euchroma using response surface methodology (RSM) and to evaluate the antimicrobial activity of shikonin. The maximum yield of shikonin was 1.26% under the optimal extraction conditions (ultrasound power, 93 W; time, 87 min; temperature, 39°C; and liquid‐solid ratio, 11 : 1). Shikonin showed inhibitory activity against standard strains and clinical isolates to varying extents (MICs ranging from 128 to 1024 μ g/mL, MBCs ranging from 256 to 2048 μ g/mL), and it was more effective for Gram‐positive bacteria as indicated by lower MIC and MBC values. Time‐kill curves revealed that antibacterial activity of shikonin exhibited a dose‐response relationship. In summary, via this study, we identified ultrasound‐assisted RSM as the optimal extraction method for shikonin, which is a potential material for the treatment of bacterial infections.