Patients receive lower dose entinostat orally (PO) on days 1 and 8 or higher dose entinostat PO on days 1, 8, and 15, and pembrolizumab intravenously (IV) over 30 minutes on day 1 of course 2 and courses thereafter. Treatment repeats every 21 days for up to 4 courses in the absence of disease progression or unacceptable toxicity. Patients who achieve an objective response or maintain a stable disease (SD) status after the first 4 courses may continue to receive entinostat and pembrolizumab for up to 1 year.