In developing countries, many areas are deprived of electrical energy. Access to cleaner, more affordable energy is critical for improving the poor’s living conditions in developing countries. With the advent of smart grid technology, the integration and coordination of small grids, known as nanogrids, has become very easy. The purpose of this research is to propose a nanogrid model that will serve the purpose of providing the facility of electrical power to the poor rural community in Pakistan using hybrid renewable energy sources. This paper targets the electrification of a poor rural community of Akora Khatak, a small district located in Pakistan. The mathematical modeling of solar and wind energy, neural network-based forecasting of solar irradiance and wind velocity, and the social analysis to calculate the payback period for the community have been discussed in this paper.