Background. The molecular mechanisms and genetic markers of thyroid cancer are unclear. In this study, we used bioinformatics to screen for key genes and pathways associated with thyroid cancer development and to reveal its potential molecular mechanisms. Methods. The GSE3467, GSE3678, GSE33630, and GSE53157 expression profiles downloaded from the Gene Expression Omnibus database (GEO) contained a total of 164 tissue samples (64 normal thyroid tissue samples and 100 thyroid cancer samples). The four datasets were integrated and analyzed by the RobustRankAggreg (RRA) method to obtain differentially expressed genes (DEGs). Using these DEGs, we performed gene ontology (GO) functional annotation, pathway analysis, protein-protein interaction (PPI) analysis and survival analysis. Then, CMap was used to identify the candidate small molecules that might reverse thyroid cancer gene expression. Results. By integrating the four datasets, 330 DEGs, including 154 upregulated and 176 downregulated genes, were identified. GO analysis showed that the upregulated genes were mainly involved in extracellular region, extracellular exosome, and heparin binding. The downregulated genes were mainly concentrated in thyroid hormone generation and proteinaceous extracellular matrix. Pathway analysis showed that the upregulated DEGs were mainly attached to ECM-receptor interaction, p53 signaling pathway, and TGF-beta signaling pathway. Downregulation of DEGs was mainly involved in tyrosine metabolism, mineral absorption, and thyroxine biosynthesis. Among the top 30 hub genes obtained in PPI network, the expression levels of FN1, NMU, CHRDL1, GNAI1, ITGA2, GNA14 and AVPR1A were associated with the prognosis of thyroid cancer. Finally, four small molecules that could reverse the gene expression induced by thyroid cancer, namely ikarugamycin, adrenosterone, hexamethonium bromide and clofazimine, were obtained in the CMap database. Conclusion. The identification of the key genes and pathways enhances the understanding of the molecular mechanisms for thyroid cancer. In addition, these key genes may be potential therapeutic targets and biomarkers for the treatment of thyroid cancer.