This study investigates the efficacy of applying a Lorentz force to improve the efficiency of a photovoltaic-thermal (PVT) system featuring a finned duct, while also addressing challenges associated with dust accumulation. The magnetic field helps to prevent nanoparticle aggregation, enhancing the cooling process. The use of a finned duct combined with a nanofluid as the cooling medium efficiently dissipates excess heat from the silicon layer. Dust accumulation on the glass layer reduces transmissivity, negatively impacting system performance. The magnetic field's interaction with the nanoparticles enhances convective cooling of the upper layer, leading to an overall improvement in performance. Increased pumping power results in higher cooling rates, with improvements of approximately 3.48 % in thermal efficiency (ηth), 75.01 % in thermoelectric generator efficiency (ηTEG), and 39.37 % in photovoltaic efficiency (ηPV). An increase in the Hartmann number (Ha) improves ηth by about 1.87 %, with corresponding enhancements in electrical performance components. A higher concentration of ferrofluid further boosts performance, with the effect being roughly 1.7 times more significant in the absence of MHD compared to when Ha = 97. Dust presence decreases ηth, ηTEG, and ηPV by approximately 9.39 %, 8.55 %, and 25.77 %, respectively. Furthermore, the presence of Ha diminishes the influence of Vin on ηth by around 1.33 %.