Two InGaN-based light-emitting diodes (LEDs) with and without pre-layer were prepared, and both had a similar multi-quantum well (MQW) structure with four green QWs near n-GaN and one blue QW close to p-GaN. The pre-layer established large V-shaped pits in MQWs. In addition to the regular vertical p-n junction along c-axis, a kind of horizontal p-n junction created by n-type MQWs and p-GaN filled in V-shaped pits was introduced. And the effect of the horizontal p-n junction on optoelectronics characteristics, including photoluminescence, electroluminescence, and I-V, were discussed. The horizontal p-n junction creates a strong horizontal built-in electric field which can effectively separate the photogenerated carriers in the QW close to p-GaN, leading to the absence of photoluminescence from the QW close to p-GaN. The horizontal p-n junction also provides a path for hole injection, which changes the turn-on order of QW, and reduces the voltage of the LED with large V-shaped pits. These results suggest a new thought of analyzing and designing InGaN-based LEDs with V-shaped pits.