This investigation focused on the photocatalytic treatment of pollutants in waste water using methylene blue (MB) and methyl orange (MO) as the model dyes. In this study, conducting polyaniline (PANI) based nanocomposites doped with 2D hexagonal boron nitride (h-BN) were synthesised using simplistic oxidative in-situ polymerization technique by employing ammonium persulfate as an initiator in acidic medium. The synthesised 2D h-BN doped PANI nanocomposites were comprehensively characterized using field emission scanning electron microscopy (FESEM), transmission electron microscopy (TEM), elemental mapping, X-ray diffraction (XRD), Brunauer-Emmett-Teller analysis (BET), thermogravimetric analysis (TGA), and Fourier transform infrared spectroscopy (FTIR). Degradation of MB and MO dyes under UV irradiations was performed to evaluate the photocatalytic performance of the synthesised nanocomposites. The results indicated that the h-BN nanosheets doped nanocomposites demonstrated better photocatalytic activities as compared to bare PANI or h-BN. Moreover, the nanocomposite P-BN-2, with 2 wt% of 2D h-BN nanosheets was found to be an optimal composition with 93% and 95% degradation efficiency for MB and MO within 90 min respectively.