Herein, we established an ionic liquid (IL)-based liquid-solid transformation microextraction (IL-LTME) combined with HPLC-UV detection for the simultaneous determination of triclosan (TCS) and its methylated product, methyltriclosan (MTCS), in human fluids. The IL-LTME method was based on an in situ metathesis between hydrophilic IL and ion-exchange salt to form a solid hydrophobic IL. According to the above principle, a hydrophilic IL, [C12MIM]Br, was selected as the extractant, and NH4PF6 as ion-exchange salt. The prominent advantages of the newly developed method are: (1) the in-situ reaction between the extractant [C12MIM]Br and ion-exchange salt NH4PF6 changed the IL from hydrophilic to hydrophobic that avoiding the stick of ionic liquid on the tube wall; (2) bubbling with NH3 greatly increased the contact area between IL-extractant and analytes resulting in improved extraction recovery; and (3) solidification of the [C12MIM] PF6 provided a good separation and avoided the use of specialized equipment. A series of main parameters were optimized by single-factor screening and central composite design as follows: 0.9 mL of NaOH, 2.0 min of second ultrasonically time, 10 min of centrifugation time, 21 mg of extractant [C12MIM]PF6, 2.4 min of ultrasonic time, 65 mg of NH4PF6 and 13.8 min of cooling time. Under the optimized conditions, the limits of detection for TCS and MTCS were 0.126–0.161 μg L−1 in plasma samples, and 0.211–0.254 μg L−1 in urine samples, respectively. The extraction recoveries for TCS and MTCS were in the range of 94.1–103.8%. The intra-day and inter-day precisions were 1.00–4.74% and 1.02–5.21%, respectively. In general, the IL-LTME method is environment-friendly, time-saving, economical, high efficient and robust with low detection limits and high recoveries. Thus, the newly developed method has excellent prospects for sample pretreatment and analysis of trace TCS and MTCS in blood and urine samples.