The incident took place in Khushalpur village in Punjab's Batala police district when AAP leader Gurpartap Singh Khushalpur came out of his car outside the gate of his residence.
The gunmen fired five shots at the AAP leader but he ducked near his car and escaped unhurt. Two bullets hit his car.
Senior police officers, AAP leaders and activists rushed to the spot following the incident.
Police officials said on Monday that a case of attempt to murder was registered against two unidentified persons.
"We are checking CCTV footage from the leader's house and investigations are on," Batala district police chief Deepak Hilori said.
Kushalpur had contested from Dera Baba Nanak assembly seat in the Punjab assembly polls.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.