Cooking quality is the main factor determining the market value of rice. Although several major genes and a certain number of QTLs controlling cooking quality have been identified, the genetic complexity and environmental susceptibility limit the further improvement for cooking quality by molecular breeding. This research conducted a genome-wide association study to elucidate the QTLs related to cooking quality including amylose content (AC), gel consistency (GC) and alkali spreading value (ASV) by using 450 rice accessions consisting of 300 indica and 150 japonica accessions in two distinct environments. A total of 54 QTLs were identified, including 25 QTLs for AC, 12 QTLs for GC and 17 QTLs for ASV. Among them, 10 QTLs were consistently observed by the same population in both environments. Six QTLs were co-localized with the reported QTLs or cloned genes. The Wx gene for AC and GC, and the ALK gene for ASV were identified in every population across the two environments. The qAC9-2 for AC and the qGC9-2 for GC were defined to the same interval. The OsRING315 gene, encoding an E3 ubiquitin ligase, was considered as the candidate gene for both qAC9-2 and qGC9-2. The higher expression of OsRING315 corresponded to the lower AC and higher GC. Three haplotypes of OsRING315 were identified. The Hap 1 mainly existed in the japonica accessions and had lower AC. The Hap 2 and Hap 3 were predominantly present in the indica accessions, associated with higher AC. Meanwhile, the GC of accessions harboring Hap 1 was higher than that of accessions harboring Hap 3. In addition, the distribution of the three haplotypes in several rice-growing regions was unbalanced. The three traits of cooking quality are controlled by both major and minor genes and susceptible to environmental factors. The expression level of OsRING315 is related to both AC and GC, and this gene can be a promising target in quality improvement by using the gene editing method. Moreover, the haplotypes of OsRING315 differentiate between indica and japonica, and reveal the differences in GC and AC between indica and japonica rice.