Trams (有轨电车) and trolleybus (无轨电车) in Beijing comprise part of the city's public transit infrastructure. The earliest tram service in Beijing dates to 1899 and street cars were the chief form of public transit from 1924 until the late 1950s until they were replaced by trackless trolleybuses that continue to ply tram routes, drawing power in the same way, from overhead wires. In the 1960s to 1970s, trolleybus buses were among the most important means of surface public transportation in the city and their routes expanded beyond the old city to the inner suburbs. Trolley bus expansion ceased in the 1980s with the growth of city buses with internal combustion engines, but electric trolleybus service has continued on more than a dozen lines and remains an important component of surface public transit in the city. In 2008, tram service returned to Beijing with the introduction of a tourist street car on Qianmen Avenue.
As of June 2015, trolleybuses run on twenty Beijing Bus routes: Nos. 6, 22, 38, 42, 101-109, 111, 112, 114-116, 118, 124, 127, BRT1, BRT3 and BRT3 Shuttle(区间). Most of these trolleybus routes are located inside the Third Ring Road. A tourist tram runs on Qianmen Avenue.
The oldest municipal trolley service in Beijing dates to 1899 when foreign interests built and operated a 7.5-km tram service between Majiapu and Yongdingmen. The track was destroyed during the Boxer Rebellion in 1900.
In June 1921, the city government established the Beijing Electric Trolley Joint Stock Company and used company shares to secure a 2 million dollar loan from Banque Franco-Chinoise pour le Commerce et l'Industrie to fund the enterprise. Virtually all equipment were imported – the tram tracks from France, street car from Japan, power generation equipment from Sweden and Germany, and repair facilities from Britain. Tram service commenced three years later on December 17, 1924. Several hundred guests, foreigners among them, attended the inauguration at the southern end of Tiananmen Square. A dozen street cars paraded along the 9-km initial tram route from Qianmen to Xizhimen. City residents crowded along route to see the new vehicles. Five years later, the number of routes grew to five, which were distinguished by the colors red, yellow, blue, white and green. The street cars were for the most part well received by city residents, except rickshaw drivers whose business diminished considerably. On October 22, 1929, the rickshaw driver's union clashed with the Trolley Company and rickshaw drivers swarmed into the Tram depot, and destroyed 63 trams, halting service for 18 days.