Two-dimensional transition metal dichalcogenides (TMDs) are promising materials for semiconductor nanodevices owing to their flexibility, transparency, and appropriate band gaps. A variety of optoelectronic and electronic devices based on TMDs p-n diodes have been extensively investigated due to their unique advantages. However, improving their performance is challenging for commercial applications. In this study, we propose a facile and dopingfree approach based on the contact engineering of a few-layer tungsten di-selenide to form a lateral p-n homojunction photovoltaic. By combining surface and edge contacts for p-n diode fabrication, the photovoltaic effect is achieved with a high fill factor of ≈0.64, a power conversion efficiency of up to ≈4.5%, and the highest external quantum efficiency with a value of ≈67.6%. The photoresponsivity reaches 283 mA/W, indicating excellent photodiode performance. These results demonstrate that our technique has great potential for application in next-generation optoelectronic devices.