Pitaya is rich in nutrition and unique in function and contains vegetable albumin, anthocyanins, rich vitamins, and water soluble dietary fiber, which are rare in fruits and vegetables. However, researches mostly focused on pitaya cultivation, biological characteristics, fresh‐keeping, and lacked analyses about chemical composition of pitaya. Therefore, ethanol extraction and GC/MS were used to extract and identify the bioactive components in pulp and pericarp of red pitaya and white pitaya. The extracting results showed that percentages of ethanol extracts from pulp and pericarp of red pitaya were 14.5% and 12%, whereas those of white pitaya were 16% and 12%. The GC/MS results showed that different kinds of bioactive constituents were identified in fresh pericarp and pulp of red pitaya and white pitaya. In the four ethanol extracts, there are rich polysiloxane plant organosilicon with total contents of 10.09%, 24.21%, 25.77%, and 23.25%. Meanwhile, there are many heterocyclic substances, and the content of pericarp is much higher than that of pulp. The four ethanol extracts also contain some other bioactive ingredients, such as esters, hydrocarbons, alcohols, amides, halides, and fatty acids, which can be used as raw materials for biomedicine, advanced cosmetics, and skin care products.