The invention discloses a brain-like device capable of carrying out memory enhancement and cognitive identification of nerve cells, and a preparation method thereof. The device takes an Si substrate GaN base wafer as a carrier and comprises a silicon substrate layer, an epitaxy buffer layer arranged on the silicon substrate layer, an n-GaN layer arranged on the epitaxy buffer layer, an emitting electrode and a collector electrode, wherein the emitting electrode and the collector electrode are arranged on the n-GaN layer and have the same structure; the emitting electrode and the collector electrode independently comprise an upper table board, the n-GaN layer, an InGaN/GaN quantum well, a p-GaN layer and a p-electrode, wherein the n-GaN layer, the InGaN/GaN quantum well, the p-GaN layer and the p-electrode are connected in sequence and are arranged on the upper table board; the emitting electrode is independently connected with the collector electrode through waveguide; and a hollow cavity is arranged below the n-GaN layer to enable a photo-induced synapsis transistor and the waveguide to hang in the air. By use of the device, photons can be used for replacing electrons or protons to serve as an information carrier to simulate the transmission of neurotransmitters, the time accumulation, the spatial accumulation and the time-space mixing accumulation of a human brain as well as an identification effect can be simulated, and a foundation is laid for researching complex brain memory characteristics.