The heating of the solar corona is a longstanding mystery in astrophysics. Considering that the solar magnetic field is spatially inhomogeneous with a considerable magnetic gradient from the solar surface to the corona, this work proposes a magnetic gradient pumping (MGP) mechanism to try to explain the formation of hot plasma upflows, such as hot type II spicules and hot plasma ejections. In the MGP mechanism, the magnetic gradient may drive the energetic particles to move upward from the underlying solar atmosphere and form hot upflows. These upflow energetic particles are deposited in the corona, causing it to become very hot. Rough estimations indicate that the solar corona can be heated to above 1 million degrees, and the upflow velocity is about 40 km s −1 in the chromosphere and about 130 km s −1 in the corona. The solar magnetic flux tubes act as pumpers to extract energetic particles from the underlying thermal photosphere, convey them, and deposit them in the corona. The deposit of these energetic particles causes the corona to become hot, and the escape of such particles from the photosphere leaves it a bit cold. This mechanism can present a natural explanation to the mystery of solar coronal heating.