A series of 2-phenylthiazole analogues were designed and synthesized as potential histone deacetylase 6 (HDAC6) inhibitors based on compound 12c (an HDAC6/tubulin dual inhibitor discovered by us recently) and CAY10603 (a known HDAC6 inhibitor). Among them, compound XP5 was the most potent HDAC6 inhibitor with an IC50 of 31 nM and excellent HDAC6 selectivity (SI = 338 for HDAC6 over HDAC3). XP5 also displayed high antiproliferative activity against various cancer cell lines including the HDACi-resistant YCC3/7 gastric cancer cells (IC50 = 0.16–2.31 μM), better than CAY10603. Further, XP5 (50 mg/kg) exhibited significant antitumor efficacy in a melanoma tumor model with a tumor growth inhibition (TGI) of 63% without apparent toxicity. Moreover, XP5 efficiently enhanced the in vivo antitumor immune response when combined with a small-molecule PD-L1 inhibitor, as demonstrated by the increased tumor-infiltrating lymphocytes and reduced PD-L1 expression levels. Taken together, the above results suggest that XP5 is a promising HDAC6 inhibitor deserving further investigation.