The drug Nafcillin is an antibiotic medicine that belongs to the penicillin class of drugs. It is especially useful in treating bacterial infections caused by germs that are resistant to other types of penicillin medicines. Nafcillin antibiotic medicine is a generic drug and the brands include Nallpen and Unipen. It works by interfering with the cell walls of bacteria, preventing them from forming important cell walls. This action effectively kills the bacteria.