The chemical reactions and pathways involving acrylonitrile, a colorless, volatile liquid with a pungent odor. Acrylonitrile is used in the production of acrylic fibers, plastics, and synthetic rubbers.