The MepRAB operon in Staphylococcus aureus has been identified to play a role in drug resistance. Although the functions of MepA and MepR are known, little information is available on the function of MepB. Here we report the X-ray structure of MepB to 2.1 Å revealing its structural similarity to the PD-(D/E)XK family of endonucleases. We further show that MepB binds DNA and RNA, with a higher affinity towards RNA and single stranded DNA than towards double stranded DNA. Notably, the PD-(D/E)XK catalytic active site residues are not conserved in MepB. MepB's association with a drug resistance operon suggests that it plays a role in responding to antimicrobials. This role is likely carried out through MepB's interactions with nucleic acids.