The impact of wettability on the confined phase behavior of fluids is paramount for various applications, such as gas storage, carbon dioxide sequestration, and water purification. However, the understanding of the fluid-solid intermolecular interactions in confined systems is still limited and requires further investigation. This work investigates the effect of hydrophilic and hydrophobic nanoporous materials on the adsorption and desorption isotherms of n-butane. The hydrophilic samples in this research are MCM-41 silica powder with two different pore sizes (80 and 100 Å). MCM-41 samples were successfully treated with hexamethyldisilazane (HMDS) to create hydrophobic adsorbents. Isotherms of n-butane in materials with different wetting states were generated at various temperatures using an upgraded gravimetric apparatus. The results demonstrated that n-butane was adsorbed more onto the hydrophilic MCM-41 materials during the initial adsorption process. The lower affinity between n-butane and the modified MCM-41 samples slightly increased the capillary condensation and evaporation pressures in these materials compared to those in the original ones. However, it is noted that wettability's influence on the confined phase transitions of n-butane was not significant in this study. Interestingly, the hysteresis behavior of the vapor-liquid and liquid-vapor phase transitions due to confinement was independent of the surface's wetting properties. Kelvin's equation for a hemispherical meniscus was adopted to evaluate the capillary evaporation pressures of n-butane in nanopores. The calculated pressures showed agreement with experimental data when appropriate pore size and surface tension values were applied. These findings provide valuable insights into the impacts of surface chemistry and wettability on the phase behavior of hydrocarbon gas in nanoporous media. Furthermore, this study enriches the experimental database on confined fluids, which is essential for developing accurate theoretical and modeling tools for numerous industrial and scientific applications.