Castanospermine acts as an inhibitor of N-glycosylation, inhibiting O-GlcNAcase, resulting in immunosuppressive, anti-inflammatory, and antiviral activities. In leukocytes and endothelial cells, castanospermine decreases expression of cellular adhesion molecules ICAM-1, ICAM-2, L-selectin, LFA-1α, VLA-4, Mac-1, and CR4. Castanospermine inhibits metastasis of melanoma cells through a mechanism that involved initial tumor cell arrest. In other cellular models, castanospermine increases secretion of misfolded secretory protein α1 antitrypsin Z. In animal models of arthritis, castanospermine decreases release of inflammatory markers into the synovium, preventing the development of arthritis when given as a pre-treatment and inhibiting disease progression when given after onset. Alteration of glycoprotein processing also inhibits viral replication of the Moloney murine leukemia virus.