Exploring the relationship between a chemical structure and its biological function is of great importance for drug discovery. For understanding the mechanisms of drug action, researchers traditionally focused on the molecular structures in the context of interactions with targets. The newly emerged high-throughput "omics" technology opened a new dimension to study the structure-function relationship of chemicals. Previous studies made attempts to introduce transcriptomics data into chemical function investigation. But little effort has been made to link structural fingerprints of compounds with defined intracellular functions, i.e. expression of particular genes and altered pathways. By integrating the chemical structural information with the gene expression profiles of chemical-treated cells, we developed a novel method to associate the structural difference between compounds with the expression of a definite set of genes, which were called feature genes. A subtraction protocol was designed to extract a minimum gene set related to chemical structural features, which can be utilized in practice as markers for drug screening. Case studies demonstrated that our approach is capable of finding feature genes associated with chemical structural fingerprints.