Calcium and magnesium are major nutrient elements of plants, and both play an important role in plant growth and development. Pinus massoniana and P. hwangshanensis are important afforestation tree species in barren mountains in China. However, observation and research on calcium and magnesium nutrition of dominant forest species in China are still limited. This study determined the concentration of calcium and magnesium in needles for two species from five sites in East China by inductively coupled plasma optical emission spectrometry (ICP-OES). We then explored the inter- and intra-population variation pattern of calcium and magnesium and their relationship with environmental factors. There were significant differences in traits among populations. The strongest factors, which impacted the variation of calcium and magnesium concentration, were elevation and individual differences, respectively. Element concentration was correlated to environmental factors such as longitude, latitude, elevation, and mean annual temperature. The results of this study can be helpful for a better understanding of tree growth, population survival, and forest succession.