Transient receptor potential melastatin member 8 (TRPM8) is a Ca2+-permeable cation channel that serves as the primary cold and menthol sensor in humans. Activation of TRPM8 by cooling compounds relies on allosteric actions of agonist and membrane lipid phosphatidylinositol-4,5-bisphosphate (PIP2), but lack of structural information has thus far precluded a mechanistic understanding of ligand and lipid sensing by TRPM8. Using cryo-electron microscopy, we determined the structures of TRPM8 in complex with the synthetic cooling compound icilin, PIP2, and Ca2+ and in complex with the menthol analog WS-12 and PIP2. Our structures reveal the binding sites for cooling agonists and PIP2 in TRPM8. Notably, PIP2 binds to TRPM8 in two different modes, which illustrate the mechanism of allosteric coupling between PIP2 and agonists. This study provides a platform for understanding the molecular mechanism of TRPM8 activation by cooling agents.