Analysis of antibiotic residues in livestock products is challenging due to the low concentration of antibiotic residues and the complexity of the sample matrix. This study successfully used selective adsorbents from molecular imprinted polymer (MIP) materials for sample preparation. An adsorbent made of chitosan-based molecular imprinted polymer (Chi-MIP) was used to extract tetracycline residues from egg and milk samples. The adsorbent was made by preparing 0.1 grams of Chi-MIP in a 2x2 cm cellulose filter paper bag. Next, an adsorbent containing tetracycline was added to the sample. The extraction process was carried out using a hotplate stirrer. At the end of the extraction process, the extracted antibiotics are removed from the adsorbent through a desorption process in an organic solvent via an ultrasonicator. After that, the desorbed analytes were analyzed via a UV‒Vis spectrophotometer at a wavelength of 267 nm. To obtain optimum results, the extraction conditions were optimized to obtain the following results: extraction time of 12 minutes, desorption time of 3 minutes, and ethyl acetate as the desorbing organic solvent. Using the standard addition method, method validation results were obtained for each milk and egg sample matrix, which indicated a linearity range of 1–5mg/L, a correlation coefficient (R2) of 0.99, accuracy values of 98.22% and 88.10%, precisions of 2.74% and 1.06%, LoDs of 0.4 mg/L and 0.51mg/L, LoQs of 1.52mg/L and 1.70mg/L, and enrichment factors of 3.27.