Ephedra, the sole genus in the Ephedraceae family, comprises 75 species distributed across Asia, North America, and South America. Ephedrae herba, a well-established traditional Chinese medicine, has been used in clinical practice for over two millennia. Ephedra is widely used to treat asthma, colds, and coughs. Given the diversity of Ephedra species, studying their chemical composition and biological activity is essential for their comprehensive utilization. The chemical profiles of different Ephedra stem (MHS) and root (MHR) species were analyzed using ultra-performance liquid chromatography coupled with quadrupole time-of-flight mass spectrometry (UPLC-Q/TOF-MSMS). Network pharmacology was applied to investigate the mechanisms by which Ephedra influences acute lung injury (ALI). An in vitro ALI model, induced by LPS, was created to assess the activities of various MHS and MHR species. The anti-inflammatory mechanisms were validated through RT-qPCR and molecular docking studies. The results showed that a total of 27 and 35 constituents were identified in MHS and MHR, respectively, with 12 and 13 compounds screened by chemometric analysis as distinguish chemicals for different species of MHS and MHR Network pharmacology identified 7 core components in MHS and MHR, respectively, that intervene in ALI. Moreover, quercetin-4'-O-glucoside, (+)-catechin, and l-norpseudoephedrine from MHS, along with ephedradine A, epigallocatechin, and (-)-epicatechin from MHR, were identified as key components distinguishing the different parts of Ephedra. A comparison of in vitro anti-inflammatory activities of various MHS and MHR species in an ALI model revealed varying degrees of anti-inflammatory activity. Correlation analyses indicated that apigenin-6,8-C-dihexoside, vitexin-2-O-rhamnoside, quercetin-4'-O-glucoside, and pseudoephedrine from MHS, and ephedradine A, feruloylhistamine, kaempferol-3-O-glucoside-7-O-rhamnoside, and diphenydramine from MHR may be the core compounds contributing to the differences in the activity of various MHS and MHR species. RT-qPCR and molecular docking results indicate that Ephedra may exert anti-inflammatory effects on the MAPK/NF-κB targets through 14 core components. This study serves as a foundational reference for identifying Ephedra species, assessing their quality, and evaluating their pharmacodynamics.