The aim of this study is to fabricate surface plasmon resonance (SPR) biosensors for real-time detection of protein in complex media. Lysozyme (Lyz) was chosen as a model, and dopamine was used as functional monomer and cross-linker to prepare Lyz surface imprinted SPR biosensors (Lyz-MIPs). Non-covalent interaction was introduced into Lyz-MIPs via a self-assembled monolayer of 3-mercaptopropionic acid to improve the specificity, and protein-resistant poly(2-methyl-2-oxazoline-co-ethylene imine) was also introduced to resist nonspecific adsorption of polydopamine toward proteins in noncavity regions. The prepared Lyz-MIPs biosensor was characterized by X-ray photoelectron spectroscopy, Fourier transform infrared spectroscopy, atomic force microscopy, variable angle spectroscopic ellipsometry, static water contact angle, and zeta potential measurements. SPR adsorption studies were carried out in aqueous Lyz solutions, and the limits of detection and quantification were obtained as 0.19 & mu;g mL-1 and 0.58 & mu;g mL-1, respectively. In addition, Lyz-MIPs biosensor exhibited high selectivity and good reusability. Finally, Lyz-MIPs biosensor was used to detect Lyz in complex media. The recovery of Lyz in simulated egg white was 95.3-105.0%, and 0.23 & mu;g mL-1 Lyz was detected by using Lyz-MIPs biosensor in 20,000 times diluted hen egg white.