InGaN alloys are widely researched in diverse optoelectronic applications. This material has also been demonstrated as a photovoltaic material. This paper presents the study to achieve optimum electrically active p-type InGaN epi-layers. Mg doped InGaN films with 20% In composition are grown on GaN templates/sapphire substrates by MOCVD. It is found that the hole concentration of p-type InGaN depends strongly on the Mg flow rate and V/III molar ratio and hole concentration greater than 2×1019 cm−3 has been achieved at room temperature. The optimum activation temperature of Mg-doped InGaN layer has been found to be 550-600°C, which is lower than that of Mg-doped GaN. A solar cell was realized successfully using the InGaN epi-layers presented here.