Disclosed herein is an optical stimulator inserted into a biological tissue for obtaining a neural signal by stimulating a neuron with a propagating light. The optical stimulator includes: a main unit comprising electrodes, and electrical terminals connected to the electrodes a waveguide extended from a side of the main unit and comprising electrochromic films and a light source disposed in the main unit and producing light along a direction in which the electrochromic films formed in the waveguide are arranged. Each of the electrical terminals is connected to the respective electrochromic films, and the electrochromic films change a propagation path of light reaching the electrochromic films upon a voltage being applied thereto from the electrical terminals, to stimulate a neuron.