A novel electrically controlled leaky-wave antenna (LWA) with capability of fixed frequency beamforming scanning is proposed in this communication. The antenna is designed on substrate-integrated waveguide (SIW), and the slot period of the antenna can be changed electronically by switching between “ON” and “OFF” states of PIN diodes connected to two edges of slots. Based on the reconfigurable property of slot period, the phase constant of the -1th spatial harmonic can be modified, thus the beam direction of antenna can be changed and continuous beam scanning can be realized. For specific applications in linear confined space, scanning beam with almost the same field strengths along a straight path is commonly required. Therefore, a hybrid coding method is proposed in this paper and applied to a 2×1 antenna array to realize bilateral beamforming scanning. Simulation and measurement results show that a wide beam scanning range of 99° at 5.98 GHz can be obtained in both cases of continuous beam scanning and beamforming scanning. The proposed LWA array is suitable for the future application of smart mobile communication.