Nitrilases participate in the nitrile metabolism in microbes and plants. They are widely used to produce carboxylic acids from nitriles. Nitrilases were described in bacteria, Ascomycota and plants. However, they remain unexplored in Basidiomycota. Yet more than 200 putative nitrilases are found in this division via GenBank. The majority of them occur in the subdivision Agaricomycotina. In this work, we analyzed their sequences and classified them into phylogenetic clades. Members of clade 1 (61 proteins) and 2 (25 proteins) are similar to plant nitrilases and nitrilases from Ascomycota, respectively, with sequence identities of around 50%. The searches also identified five putative cyanide hydratases (CynHs). Representatives of clade 1 and 2 (NitTv1 from Trametes versicolor and NitAg from Armillaria gallica, respectively) and a putative CynH (NitSh from Stereum hirsutum) were overproduced in Escherichia coli. The substrates of NitTv1 were fumaronitrile, 3-phenylpropionitrile, β-cyano-l-alanine and 4-cyanopyridine, and those of NitSh were hydrogen cyanide (HCN), 2-cyanopyridine, fumaronitrile and benzonitrile. NitAg only exhibited activities for HCN and fumaronitrile. The substrate specificities of these nitrilases were largely in accordance with substrate docking in their homology models. The phylogenetic distribution of each type of nitrilase was determined for the first time.