We present the micromachined GaN-on-Si μLED optoelectrodes with neuron-sized LEDs monolithically integrated on a thin narrow silicon shank for optical stimulation and electrical recording in a behaving animal. The fabricated μLEDs show an optical power of 1.9 μW at 4 V from a small size of 15 μm × 10 μm with a peak plug efficiency of 0.6 %. This allows high spatial and temporal resolution optogenetic studies from the μLED array in a small pitch of 60 μm along with the integrated recording electrodes in 20-μm pitch. Stimulation artifacts were significantly mitigated by two-metal-layer shielding topology. In vivo validation of the fabricated optoelectrode confirmed the successful light-induced modulation of neuronal activities in hippocampus with square optical pulses of 100-ms duration.