The melting transition of methane adsorbed in nanopores has been studied and compared in two types of structures: carbon slits pores and square shaped channels. We show that the nano-confinement not only modifies the temperatures of phase transformation but also induces strong space heterogeneity of the adsorbate. We emphasize the role of the structural heterogeneity on the mechanism of melting: in nanometric pores, each adsorbed layer exhibits different mechanisms of structural transformation and the notion of a unique transition temperature is not well defined.