Void melting in solids is a very complicated process, while the mechanism is far from understood. In this paper, we studied the void melting in Pd and Si solids using a molecular dynamics simulation method. It is found that there exist two different melting mechanisms for nanovoid, nucleation melting and non-nucleation melting; although void melting in Pd follows the former mechanism, that in Si follows the latter (unless the nanovoid size decreases to a critically small value). For nucleation melting, there will be liquid nucleate at the surface of the nanovoid, and then the liquid fills the void before the temperature reaches the melting point of the solids. For nonnucleation melting, there will be local stiffening around the nanovoid, and the nanovoid always exists until the whole matrix comes to melt. For these two different melting mechanisms, the inner surface atoms will behave totally differently. We find the most exciting thing to be that the two mechanisms can be well unified based on surface melting theory. Furthermore, it is predicted that when the nanovoid decreases to a critical value the matrix solid may be superheated, which agrees well with the simulation of void melting in Pd and Si solid.