2-Azetidinones, commonly known as beta-lactams, are well-known heterocyclic compounds. Herein we described the synthesis and biological evaluation of a series of novel beta-lactams. In vitro inhibition assays against HDAC isoforms showed an interesting isoform-selectivity of these compounds towards HDAC6 and HDAC8. The isoform selectivity changed in response to modification of the azetidinone-ring nitrogen atom substituent. The presence of an N-thiomethyl group is a prerequisite for the activity of these compounds in the micromolar range towards HDAC8.