South Wales Police said they were called to a house in Maes-Yr-Ysgol, Barry, around 11:30 a.m. on July 12.
The 29-year-old from Llandeyrn, Cardiff, was taken to hospital for treatment after his arrest.
A 28-year-old Splott man and a 33-year-old Fairwater man were also arrested for firearm possession.
One was arrested, while the other was taken to the hospital.
Following reports of a man in possession of a weapon, South Wales Police confirmed the street had been cordoned off. Residents were asked to stay in their residences.
According to the police, a firearms officer was dispatched to the scene, and a firearm was removed from the residence.