A novel molecularly imprinted polymer material based on the metal-organic framework NH₂-MIL-101(Cr) (MOF-MIP) was prepared. The synthesized MOF-MIP was characterized by IR, XRD, SEM and N2 absorption. The characterization results displayed that the MOF-MIP which exhibited an octahedral shape had good dispersibility, good thermal stability and a high surface area. Subsequently, the adsorption behavior of MOF-MIP to diclofenac sodium (DS) in aqueous solution was examined. A series of adsorption experiments demonstrated that the MOF-MIP had high transfer mass rates and high sensitivity and selectivity for DS. Then the MOF-MIP was used as the adsorbent of dispersive micro-solid phase extraction (DMSPE) for the detection of DS in urine. Under optimum conditions, the average recovery of DS ranged from 88.3 to 101.6% with RSD of 5.6%. The described method provides a rapid route for determination of DS in human urine.