A imidazolium ionic liquid-functionalized silica (Sil-IL) was synthesized and used as mixed-mode sorbent for solid phase extraction (SPE) of non-steroidal anti-inflammatory drugs (NSAIDs, naproxen, ketoprofen, indoometacin and tolfenamic acid) residues from bovine milk. A method combining this mixed-mode SPE and high performance liquid chromatography-ultraviolet detector (HPLC-UV) was established for simultaneous analysis of four kinds of NSAIDs residues in bovine milk. The prepared Sil-IL was characterized by Fourier transform infrared spectra, Raman spectra and elemental analysis. Then the retention mechanism of NSAIDs on Sil-IL sorbent was explored and the parameters affecting the extraction efficiency were optimized. Experimental results showed that Sil-IL had good extraction selectivity and high extraction efficiency towards four kinds of NSAIDs. Meanwhile, the interaction between Sil-IL and NSAIDs was mainly hydrophobic and anion exchange interactions. Under optimal SPE conditions, good sensitivity was achieved with a limit of detection of 1.2-1.9 & mu;g/kg. The method displayed good linear relationship in the concentration range of 3-1000 & mu;g/L for ketoprofen, naproxen, indomethacin and 4-1000 & mu;g/L for tolfenamic acid, with the correlation coefficient (R2) of 09996-0.9998. The intra-day and inter-day precision were 1.0%-3.0% and 1.9%-6.3%, respectively. The recoveries of four kinds of NSAIDs in bovine milk at two spiked levels were 90.8%-105.3% with relative standard deviations less than 6.1%. The established method was proved to be accurate, reliable, simple, sensitive and selective, and could be used for determination of NSAIDs residues in milk sample.