Abstract In this paper, we investigated the growth of GaN pn-junction layers on silicon (111) by plasma assisted molecular beam epitaxy (PA-MBE) system and the effect of thermal annealing of Ni/Ag contacts on the sample for photodetector applications. Si and Mg were used as n- and p-dopants, respectively. The reflection high energy electron diffraction images indicated a good surface morphology of GaN pn-junction layer. The full width at half maximum (FWHM) obtained from XRD measurement was 0.34°, indicating a good quality layer of sample. The pn-junctions sample has a good optical quality which is reflected by the photoluminescence system measurement. The structural evolution and temperature dependence of the current of Ni/Ag contacts on GaN pn-junction at various annealing were investigated by scanning electron microscopy (SEM) and current–voltage (I–V) measurements. The temperature dependence of the current may be attributed to changes of the surface morphology of Ni/Ag films on the surface. SEM results indicated the degradation of Ni/Ag contacts on GaN pn-junction above 800°C.