An acousto-optic switch scheme based on optical tamm state (OTS) is proposed. The acousto-optic switch’s structure is one-dimensional photonic crystal heterostructure, which is composed of three materials: silicon dioxide, gallium arsenide and tellurium dioxide. All three materials are acousto-optic materials, which can ensure the acousto-optic effect when the ultrasonic wave and the light wave are incident at the same time. Due to the acousto-optic effect, the refractive index and thickness of one-dimensional photonic crystal heterostructures are changed by ultrasonic. The acousto-optic switch changes the ultrasonic amplitude to shift the intrinsic wavelength of OTS to the shorter wave direction. With the increase of ultrasonic amplitude, the intrinsic wavelength of OTS hardly changes after the amplitude exceeds 0.4 nm. This means that the ultrasonic wave with an amplitude of 0.4 nm can shift the intrinsic wavelength to 1538 nm. The acousto-optic switch realizes the on-off function within the permitted range. In this paper, the theoretical model of the acousto-optic switch is established. The propagation of ultrasonic wave in one-dimensional photonic crystal heterostructure is analyzed by theoretical model. The propagation of light in the medium after acousto-optic effect is analyzed by transmission matrix method. The simulation is carried out through COMSOL Multiphysics software. The results show OTS exists and localization can be seen in the electric field diagram. The acousto-optic switch of 1548.8–1551.7 nm can be realized by applying certain amplitude of ultrasonic or not. In this wavelength range, the extinction ratio is not lower than 12 dB and the insertion loss is not higher than 0.97 dB. The maximum extinction ratio is 13.17 dB, and the minimum insertion loss is only 0.65 dB. The acousto-optic switch of 1536.6–1543.3 nm can be realized by applying ultrasonic wave with amplitude corresponding to the length of incident light. In this wavelength range, the extinction ratio is not lower than 12 dB, and the insertion loss is not higher than 0.99 dB. The maximum extinction ratio is 13.15 dB, and the minimum insertion loss is only 0.65 dB. The response time of the acousto-optic switch is less than 13 ns. The acousto-optic switch has the characteristics of high extinction ratio and low insertion loss. It has a good application prospect and can be effectively applied in future optical communication.