Post-synthetic ligand exchange (PSE) is a versatile and powerful tool for installing functional groups into metal-organic frameworks (MOFs). Exposing MOFs to solutions containing triazole- and tetrazole-functionalized ligands can incorporate these heterocyclic moieties into Zr-MOFs through PSE processes.