The Paleotethys Ailaoshan Ocean separated the South China and Indochina blocks during the late Paleozoic. Uncertainty remains regarding subduction of this ocean—whether it was subducted eastward beneath the South China block or westward beneath the Indochina block. In this study, we present new detrital zircon U-Pb age, and Hf and O isotope data from the Longtan Formation, which was recognized to be deposited before the ocean closed. Our results show that the formation can be divided into three units: Unit 1 is distributed west of the suture and dominates the area; it contains major age peaks at 290–250 Ma and minor multiple old age peaks. Unit 2 consists of a minor distribution west of the suture, and it shows a dominant 250 Ma age peak; old zircons are very few or not present. Their Hf and O isotopic signatures are similar to those of unit 1. Unit 3 is distributed east of the suture and is characterized by a single distinct ca. 240 Ma age peak with almost no Precambrian zircons. We interpret that units 1 and 2 were likely deposited in a back-arc and forearc basin, respectively, and a volcanic arc developed on the eastern margin of the Indochina block, similar to the present-day northeastern Japan arc. Meanwhile, unit 3 was likely deposited in a forearc basin on the western margin of the South China block. Therefore, the Ailaoshan Ocean may undergone bipolar subduction both westward and eastward beneath the Indochina and South China blocks, respectively.