The incident occurred in the city's Dhabarsi neighbourhood, under the Masuri police station.
The student, identified as Mohammad Arif was attending the wedding function of one of his relatives. During the programme, a man identified as Kamil started firing from his licensed revolver. A bullet from his revolver hit Arif in his upper abdomen.
He was rushed to a local hospital where he succumbed to his injuries.
"A case has been registered against Kamil. He has been detained and his weapon has been seized," said Ghaziabad SP (Rural) Jagdish Sharma.