We investigate the origin of a bottom-heavy stellar initial mass function ( IMF ) recently observed in elliptical galaxies by using chemical evolution models with a non-universal IMF . We adopt the variable Kroupa IMF with the three slopes ( \alpha _ { 1 } , \alpha _ { 2 } , and \alpha _ { 3 } ) dependent on metallicities ( [ Fe/H ] ) and densities ( \rho _ { g } ) of star-forming gas clouds and thereby search for the best IMF model that can reproduce ( i ) the observed steep IMF slope ( \alpha _ { 2 } \sim 3 , i.e. , bottom-heavy ) for low stellar masses ( m \leq 1 M _ { \odot } ) and ( ii ) the correlation of \alpha _ { 2 } with chemical properties of elliptical galaxies in a self-consistent manner . We find that if the IMF slope \alpha _ { 2 } depends both on [ Fe/H ] and \rho _ { g } , then elliptical galaxies with higher [ Mg/Fe ] can have steeper \alpha _ { 2 } ( \sim 3 ) in our models . We also find that the observed positive correlation of stellar mass-to-light ratios ( M / L ) with [ Mg/Fe ] in elliptical galaxies can be quantitatively reproduced in our models with \alpha _ { 2 } \propto { \beta [ Fe / H ] } + \gamma \log \rho _ { g } , where \beta \sim 0.5 and \gamma \sim 2 . We discuss whether the IMF slopes for low-mass ( \alpha _ { 2 } ) and high-mass stars ( \alpha _ { 3 } ) need to vary independently from each other to explain a number of IMF-related observational results self-consistently . We also briefly discuss why \alpha _ { 2 } depends differently on [ Fe/H ] in dwarf and giant elliptical galaxies .