Inter-calibrating the electromagnetic calorimeter (ECAL) of the CMS detector in situ at the LHC to achieve the energy resolution approaching 0.5% at high energy is going to be important to fully exploit the physics reach of the detector, particularly for the discovery of the Higgs boson in the two-photon decay channel. In this paper we evaluate the potential of a calibration technique that makes use of photon pairs produced in neutral pion decays, pi(0) -> gamma gamma. Such photon pairs will be selected from the QCD events accepted by the Level-1 triggers using an online filter farm. Assuming a Level-1 trigger rate of 12.5 kHz, the rate of suitable neutral pions is found to be about 0.9 kHz. We show that 95% of the barrel electromagnetic calorimeter can be calibrated to at least 1% (0.5%) precision after several days (weeks) of data-taking in the low-luminosity scenario of LHC, L = 2 center dot 10(33) cm(-2) s(-1). In addition, we show that a 1% calibration precision is achieved with pi(0) decays produced in the pi(-) test beam runs during November 2006. The obtained calibration constants are successfully used for the reconstruction of 50 GeV electrons from the test beam data.