This study was conducted to assess the economic feasibility of electricity generation from biogas in small pig farms with and without the H2S removal prior to biogas utilisation. The 2% potassium iodide (KI) impregnated activated carbon selected as H2S adsorbent was introduced to a biogas-to-electricity generation system in a small pig farm in Thailand as a case study. With the average inlet H2S concentration of about 2400 ppm to the adsorption unit, the H2S removal efficiency could reach 100% with the adsorption capacity of 0.062 kg of H2S/kg of adsorbent. Under the reference scenario (i.e., 45% subsidy on digester installation and fixed electricity price at 0.06 Euro/kWh) and based on an assumption that the biogas was fully utilised for electricity generation in the system, the payback period for the system without H2S removal was about 4 years. With H2S removal, the payback period was within the economic life of digester but almost twice that of the case without H2S removal. The impact of electricity price could be clearly seen for the case of treated biogas. At the electricity price fixed at 0.07 Euro/kWh, the payback period for the case of treated biogas was reduced to about 5.5 years, with a trend to decrease at higher electricity prices. For both treated and untreated biogas, the governmental subsidy was the important factor determining the economics of the biogas-to-electricity systems. Without subsidy, the payback period increased to almost 7 years and about 11 years for the case of untreated and treated biogas, respectively, at the reference electricity price. Although the H2S removal added high operation cost to the system, it is still highly recommended not only for preventing engine corrosion but also for the environment benefit in which air pollution by H2S/SO2 emission and impact on human health could be potentially reduced.