The shooting happened at the Arbor Lakes Apartment Complex, in 4200 block of North Bloomington Avenue in Arlington Heights, police said.
Authorities said a resident called 911 just before 2 p.m. to report a man had been shot inside her apartment.
The self-admitted shooter and the resident met officers outside and were taken to a police station, authorities said.
Detectives said they're focusing on a past relationship between the resident and the man killed as a possible contributing factor.
ABC7 was told there was an active order of protection in Cook County for the resident prohibiting the now-deceased man from contacting her.
No further information about the shooting was immediately available.
Police continue to investigate.