מחזור החנקן כרוך במעבר אטומי החנקן בין מרכיבים ביוטיים ואביוטיים במערכת האקולוגית. מרבית החנקן שבמערכת האקולוגית נאגר N2 באטמוספירה כגז, אבל רק חיידקים מכילים אנזימים הנחוצים כדי להמיר גז חנקן לצורה שימושית עבור אורגניזמים אחרים, מושג הנקרא קיבוע חנקן. לפיכך, חנקן הוא חומר מזין מוגבל מאוד במערכת האקולוגית.ברגע שחיידקים באדמה ממירים את הגז לאמוניה, צמחים יכולים אז להמיר את החנקן לחלבונים, לדנ”א, ולמולקולות אורגניות אחרות, אשר אז נצרכים על ידי אוכלי עשב ומפורקים לחומצות אמינו. ניתן להרכיבן מחדש לחלבונים המשמשים לגדילה והתפתחות, ולתזונה עבור צרכנים. במקביל, אוכלי עשב וצרכנים מחזירים חלק מהחנקן חזרה לאדמה בתור תוצרי פסולת.גם אורגניזמים מתים וגם תוצרי פסולת מכילים חנקן בצורת החלבון, השתנן וחומצת השתן. מפרקים כגון חיידקים ופטריות, מסוגלים לפרק מולקולות אלו ולשחרר אמוניה בחזרה לאדמה, שאז יכולה להיספג על ידי צמחים, או להיות מומרת לחנקה על ידי חיידקים מחנקנים. חנקות אלו יכולות גם להיספג על ידי צמחים או, בהיעדר חמצן, להיות מומרות לגז חנקן על ידי חיידקים מבטלי חנקון.בני אדם גם כן משחררים חנקן לתוך המערכת האקולוגית באמצעות שימוש בדשנים חקלאיים. אולם, כאשר משתמשים בהם בזמן הלא נכון, או בכמויות גדולות, עודף חנקן יכול לזרום לתוך מערכות אקולוגיות מימיות ולהגביר גידול חיידקים, אצות וצמחי מים, תהליך המכונה איטרופיקציה.