The invention discloses an optical device of a flexible implantable neural photoelectrode. The optical device is arranged on a flexible
polymer substrate and comprises an input
grating, a
waveguide and an output
grating, wherein the input
grating is a parallel grating and is used for
coupling incident light; the input end of the
waveguide is coupled with the input grating; the output end of the
waveguide is coupled with the output grating; and the output grating is a focusing grating and is used for optically
coupling and focusing light to irradiate above a
recording electrode and providing
photostimulation with single
cell resolution. The invention also discloses a design and preparation method of the optical device. The optical device of the flexible implantable neural photoelectrode, provided by the invention, has the advantages that
photostimulation and in-situ recording with single
cell resolution are provided through design of the waveguide and the gratings; the device is small in size, so that implantation damage can be reduced, and the device is low in loss, high in
coupling and strong in focusing; the high integration level of the device is beneficial to realizing multichannel and high-density
nerve stimulation and recording; and by adopting the flexible
polymer substrate, formation of nerve
scars can be reduced, and long-term in-vivo stable work is realized.