Polymyositis (PM) and dermatomyositis (DM) are two common types of idiopathic inflammatory myopathy and can lead to a poor prognosis and quality of life. We designed this cross-sectional study to investigate the abilities of high-frequency ultrasound (HFUS) and shear wave elastography (SWE) to assess muscle properties in patients with PM and DM and to distinguish healthy muscles from diseased muscles with PM and DM. A total of 60 patients (26 PM cases and 34 DM cases) and 65 matched healthy volunteers were continuously included in the case and control groups, respectively. For the bilateral deltoid, biceps brachii, rectus femoris, and vastus lateralis, the muscle thickness, echo intensity, and longitudinal shear wave velocity (SWV) of all participants were measured using HFUS and SWE. The intra- and interobserver reliability of SWV measurements of patients with PM and DM and the receiver operating characteristic curve for HFUS and SWE for PM and DM were analyzed. Patients with PM and DM had significantly decreased muscle thickness and increased muscle echo intensity compared to healthy controls (P<0.001). The patients' and healthy participants' deltoid, biceps brachii, rectus femoris, and vastus lateralis thickness was 19.75 and 23.00 mm, 20.45 and 22.80 mm, 18.40 and 20.20 mm, and 20.00 and 22.80 mm, respectively. Except for the biceps brachii, the mean SWV in the longitudinal orientation in patients with PM and DM significantly decreased (P<0.01). The mean SWV of the patients' and healthy participants' deltoid, rectus femoris, and vastus lateralis was 2.47 and 2.57 m/s, 1.73 and 1.87 m/s, and 1.57 and 1.77 m/s, respectively. Excellent intra- and interobserver reliability of SWV measurements on the deltoid and rectus femoris of PM and DM patients were found (intraclass correlation coefficient >0.95; P<0.001). The diagnostic performance of echo intensity in lower-extremity proximal muscles for PM and DM was excellent [area under the curve (AUC) >0.9]. The thickness of most muscles displayed moderate diagnostic performance (the AUC ranged from 0.700 to 0.775). The SWV of the vastus lateralis showed a stable performance (AUC =0.741). The combined diagnostic performance of echo intensity and thickness and the combined diagnostic performance of the 3 indicators were relatively high (the AUC ranged from 0.871 to 0.936 and from 0.898 to 0.938, respectively). Muscle thickness and echo intensity showed statistical differences in different disease stages of PM and DM (P'<0.01). HFUS and SWE may serve as imaging biomarkers for the diagnosis of PM and DM by detecting abnormal muscle thinning, enhanced muscle echo intensity, and reduced muscle SWV.