Direct proof of use
The M230 30 mm chain gun is directly documented in the 2001 War in Afghanistan through official U.S. Army and DVIDS coverage from Jalalabad Airfield. On 2017-04-25, a Task Force Tigershark ground crew member assigned to the 16th Combat Aviation Brigade prepared an AH-64E Apache M230 chain gun for a mission in Afghanistan under Operation Freedom's Sentinel.
The same Army photo essay shows the mission sequence around the Apache aircraft: crews loaded Hellfire missiles and Hydra 70 rockets, prepared and loaded the M230 chain gun, and pilots departed from Jalalabad Airfield. That source supports fielding of the M230 as part of the AH-64E Apache armament package used by U.S. Army aviation in Afghanistan.
Sources: DVIDS Chain Gun Preparation, Army Task Force Tigershark Photo Essay
Timeline
The sourced Afghanistan record is concentrated in April 2017 rather than in a public list of individual gun engagements. On 2017-04-25, U.S. Army imagery placed Task Force Tigershark AH-64E Apaches at Jalalabad Airfield preparing to depart for a mission while supporting Train, Advise and Assist Command - East and U.S. Forces Afghanistan.
DVIDS posted the M230 image two days later, preserving the date, location, unit, photographer, and public-domain media metadata. NATO and U.S. oversight sources place the event inside the Resolute Support and Operation Freedom's Sentinel phase of the wider 2001 War in Afghanistan.
Sources: DVIDS Chain Gun Preparation, Army Task Force Tigershark Photo Essay, NATO Resolute Support Mission, Lead IG Operation Freedom's Sentinel April-June 2021
Operational role
In Afghanistan, the documented operator was U.S. Army aviation on the U.S.-led coalition and Afghan government side. The cited April 2017 material identifies Task Force Tigershark, 16th Combat Aviation Brigade, 7th Infantry Division, and ties the Apache mission support to Train, Advise and Assist Command - East and U.S. Forces Afghanistan.
The documented role was Apache-mounted fire support and mission armament, not independent ground use of the cannon. Northrop Grumman identifies the M230 as the 30 mm Chain Gun used on the AH-64 Apache, while the Afghanistan-specific sources show that weapon being prepared and loaded for an AH-64E mission at Jalalabad.
Sources: Army Task Force Tigershark Photo Essay, DVIDS Chain Gun Preparation, Northrop Grumman M230 30mm Bushmaster Chain Gun