Ashwini Yadav (24) was a college classmate of Anjali and claimed to have been in a relationship with her, police said.
After his arrest last evening, he confessed to the killing, they added.
Anjali was found dead at the parking lot of her residential complex, Shatabdi Vihar, in Noida on May 31. CCTV footage had shown a man chasing her with a pistol.
Yadav said he had killed her as she got into a relationship with another man and started ignoring him after he lost his job.
The next morning he entered the society and called her to the parking lot. Sensing trouble, Anjali had tried to run, but was shot dead.