Functional monomer-template-QDs sandwich structure was employed for protein imprinting. Mesoporous structure was applied to reduce mass transfer resistance. MIPs ratiometric fluorescence achieve high sensitivity and visual signal output. The as-prepared MIPs sensor exhibited feasibility in bovine urine and blood samples.