A backfire is caused by the buildup of un-burned gasoline in the exhaust header and pipe system. Once the gas has built up to the right mixture with air, it explodes, making a loud bang. A visible flame may momentarily shoot out of the exhaust pipe.
It can happen when you start your motorcycle, for example if you stopped the bike with high rpm’s and extra gas was left in the carburetor, when you accelerate or let off the throttle. Typically backfiring results from various malfunctions related to the air to fuel ratio.
A backfire can occur in carbureted engines that are running lean where the air-fuel mixture has insufficient fuel and whenever the timing is too advanced. As the engine runs leaner or if there is less time for the fuel to burn in the combustion chamber, there is a tendency for incomplete combustion. The condition that causes this is a misfire. The result of a misfire or incomplete combustion is that unburned fuel is delivered to the exhaust where it may ignite unpredictably. Another backfire situation occurs when the engine is running rich, meaning with excess fuel, and there is incomplete combustion, with similar result. Backfire is rare with fuel-injection and computer-controlled fuel mixtures.