The present study included the procedure of preparing porous titania thin film using a direct nanocrystalline cellulose templating (NCC) as a bio-template. The microextraction applicability of the porous film was investigated by thin film microextraction (TFME) of the nonsteroidal anti-inflammatory drugs (NSAIDs) including ketorolac, meloxicam, diclofenac and mefenamic acid from different types of urine sample. The extracted NSAIDs were analyzed by HPLC-UV. Under optimum conditions, the calibration curves were linear within the range of 1.0–500 μg L−1 (2.0–200 μg L−1 for ketorolac, 2.0–500 μg L−1 for meloxicam, 1.0–200 μg L−1 for diclofenac and 1.0–200 μg L−1 for mefenamic acid). The limit of detection was found to be between 0.2 and 0.5 μg L−1. The calculated intra- and inter-day relative standard deviations RSDs% (n=3) at concentration level of 10 μg L−1 were less than 6.3% and 6.0%, respectively. Finally, the method was successfully applied to determine selected NSAIDs in urine samples from different human individuals.