Ermiao Pill (EMW), a traditional Chines medicine (TCM), composed of a two‐herb pair, Phellodendri Cortex (PC) and Atractylodis Rhizome (AR), is used for the treatment of pelvic inflammatory disease and inflammatory‐related diseases. However, the underlying mechanism is still unknown. Compatibility plays a crucial role in the complex drugs such as those used in traditional Chinese medicine. We propose a compositive strategy, which integrated pharmacokinetics and network pharmacology to explore the compatibility in EMW. Firstly, a simple, rapid, and selective method based on UPLC–MS/MS was established and validated for simultaneous qualification of six alkaloids in rat plasma, which was used for a comparative pharmacokinetic study of EMW and its constituent herb PC. The concentration–time profiles suggested that AR might reduce the toxicity of some alkaloids in EMW. Secondly, network pharmacology analysis showed that the key protein PTGS2 was targeted by four alkaloids, and that the competition among them might be allevited by AR. Thirdly, molecular docking exhibited interactions between the alkaloids and PTGS2 through H and π–π bonds, and the same residue formed interactions with different alkaloids, which account for the toxicity of these alkaloids, and these were confirmed by the cell viability assay. The combination of pharmacokinetics and network pharmacology clarified the compatibility in EMW.