We study the crystal structure of Pd(100) ultrathin films, which show ferromagnetism induced by the quantum confinement effect, using in-situ X-ray crystal truncation rod measurement and density functional calculation. The energy gain due to the appearance of ferromagnetism in Pd results in flatter and uniform film growth of ferromagnetic Pd films compared with paramagnetic Pd. In addition, ferromagnetic Pd films expand the lattice constant in order to suppress the increase in kinetic energy of electrons accompanied by the occurrence of exchange splitting. Although the traditional theory of magnetism in metals indicates that the increase in density of states that induces ferromagnetism (Stoner criterion), our present finding reveals a mechanism of modulation in the density of states via the appearance of ferromagnetism, i.e., the inverse mechanism of Stoner's theory.