A narrow bandgap polymeric semiconductor, BOC-PTDPP, comprising alkyl substituted diketopyrrolopyrrole (DPP) and tert-butoxycarbonyl (t-BOC)-protected DPP, is synthesized and used in organic field-effect transistors (OFETs). The polymer films are prepared by solution deposition and thermal annealing of precursors featuring thermally labile t-BOC groups. The effects of the thermal cleavage on the molecular packing structure in the polymer thin films are investigated using thermogravimetric analysis (TGA), UV-vis spectroscopy, atomic force microscopy (AFM), Fourier transform infrared (FT-IR) spectroscopy, and X-ray diffraction (XRD) analysis. Upon utilization of solution-shearing process, integrating the ambipolar BOC-PTDPP into transistors shows p-channel dominant characteristics, resulting in hole and electron mobilities as high as 1.32 × 10−2 cm2 V−1 s−1 and 2.63 × 10−3 cm2 V−1 s−1, which are about one order of magnitude higher than those of the drop-cast films. Very intriguingly, the dominant polarity of charge carriers changes from positive to negative after the thermal cleavage of t-BOC groups at 200 °C. The solution-sheared films upon subsequent thermal treatment show superior electron mobility (μe = 4.60 × 10−2 cm2 V−1 s−1), while the hole mobility decreases by one order of magnitude (μh = 4.30 × 10−3 cm2 V−1 s−1). The inverter constructed with the combination of two identical ambipolar OFETs exhibits a gain of ∼10. Reported here for the first time is a viable approach to selectively tune dominant polarity of charge carriers in solution-processed ambipolar OFETs, which highlights the electronically tunable ambipolarity of thermocleavable polymer by simple thermal treatment.