Faced with the increasing demand for renewable energy, researchers have developed several ways to generate them, such as biogas. Thus, the present study aims to demonstrate the economic viability of electricity generation from biodigesters in a pig farm to contribute to sustainable development by reducing pollution in the environment. Studies focused on biomass derived from pig waste are still scarce. Moreover, one of the motivations of the present study is the fact that Brazil is a major producer and exporter of pig meat, with most of the production taking place in the south and southeast regions. The methodology used is defined as exploratory, descriptive, explanatory, and applied. The scientific procedures were documentary and bibliographic research, case study, and cost analysis. An economic management model was developed using financial management instruments such as cash flow, internal rate of return, and simple and discounted payback, confirming the economic viability of the investment made for generating energy from animal biomass produced in a pig farm located in the interior of Rio Grande do Sul.