In this study, the fabrication of nanostructured GaN/porous Si by pulsed laser deposition (PLD) was demonstrated. The porous silicon was prepared using laser-assisted electrochemical etching (LAECE). The structural, optical, and electrical properties of GaN films were investigated as a function of laser fluence. XRD studies revealed that the GaN films deposited on porous silicon were nanocrystalline, exhibiting a hexagonal wurtzite structure along the (100) plane. Spectroscopic property results revealed that the photoluminescence PL emission peaks of the gallium nitride over porous silicon (GaN/PSi) sample prepared at 795 mJ/mm2 were centered at 260 nm and 624 nm. According to topographical and morphological analyses, the deposited film consisted of spherical grains with an average diameter of 178.8 nm and a surface roughness of 50.61 nm. The surface of the prepared films exhibited a cauliflower-like morphology. The main figures of merit of the nanostructured GaN/P-Si photodetectors were studied in the spectral range of 350–850 nm. The responsivity, detectivity, and external quantum efficiency of the photodetector at 575 nm under − 3 V were 19.86 A/W, 8.9 × 1012 Jones, and 50.89%, respectively. Furthermore, the photodetector prepared at a laser fluence of 795 mJ/mm2 demonstrates a switching characteristic, where the rise time and fall time are measured to be 363 and 711 μs, respectively.