Early maturity is an important agronomic trait in most crops, because it can solve the problem of planting in stubble for multiple cropping as well as make full use of light and temperature resources in alpine regions, thereby avoiding damage from low temperatures in the early growth period and early frost damage in the late growth period to improve crop yield and quality. The expression of genes that determine flowering affects flowering time, which directly affects crop maturity and indirectly affects crop yield and quality. Therefore, it is important to analyze the regulatory network of flowering for the cultivation of early-maturing varieties. Foxtail millet (Setaria italica) is a reserve crop for future extreme weather and is also a model crop for functional gene research in C4 crops. However, there are few reports on the molecular mechanism regulating flowering in foxtail millet. A putative candidate gene, SiNF-YC2, was isolated based on quantitative trait loci (QTL) mapping analysis. Bioinformatics analysis showed that SiNF-YC2 has a conserved HAP5 domain, which indicates that it is a member of the NF-YC transcription factor family. The promoter of SiNF-YC2 contains light-response-, hormone-, and stress-resistance-related elements. The expression of SiNF-YC2 was sensitive to the photoperiod and was related to the regulation of biological rhythm. Expression also varied in different tissues and in response to drought and salt stress. In a yeast two-hybrid assay, SiNF-YC2 interacted with SiCO in the nucleus. Functional analysis suggested that SiNF-YC2 promotes flowering and improves resistance to salt stress.