The energy performance of buildings and energy-saving measures have been widely investigated in recent years. However, little attention has been paid to buildings located in rural areas. The aim of this study is to assess the energy performance of two-story residential buildings located in the mountainous village of Palangan in Iran and to evaluate the impact of multiple parameters, namely building orientation, window-to-wall ratio (WWR), glazing type, shading devices, and insulation, on its energy performance. To attain a nearly zero energy building design in rural areas, the building is equipped with photovoltaic modules. The proposed building design is then economically evaluated to ensure its viability. The findings indicate that an energy saving of 29% can be achieved compared to conventional buildings, and over 22 MWh of electricity can be produced on an annual basis. The payback period is assessed at 21.7 years. However, energy subsidies are projected to be eliminated in the near future, which in turn may reduce the payback period.