The postdomestication adaptation of maize to longer days required reduced photoperiod sensitivity to optimize flowering time. We performed a genome-wide association study and confirmed that ZmCCT, encoding a CCT domain-containing protein, is associated with the photoperiod response. In early-flowering maize we detected a CACTA-like transposable element (TE) within the ZmCCT promoter that dramatically reduced flowering time. TE insertion likely occurred after domestication and was selected as maize adapted to temperate zones. This process resulted in a strong selective sweep within the TE-related block of linkage disequilibrium. Functional validations indicated that the TE represses ZmCCT expression to reduce photoperiod sensitivity, thus accelerating maize spread to long-day environments.