The man and woman were shot in a front yard in an upscale gated community in the 11500 block of Trailway Drive before 6 p.m., authorities said.
"Shortly before 6 p.m., Riverside dispatch center received several 911 calls from residents. The residents stated that a male black adult was shooting people in the roadway," said Lt. Guy Toussaint of the Riverside Police Department.
A police officer who arrived at the scene shot the suspect, who later died at a hospital.
Authorities have not released the identities of the gunman or victims.
According to police, the suspect had fired multiple rounds.
One neighbor said the suspect unloaded two gun clips, most of it aimed at the woman. Neighbors said the woman lived at the house.
Other neighbors, who did not want to be identified, said the gunman and the female victim were estranged.
A friend, who also did not want to be identified, said the suspect had lost his job because of allegations of domestic violence. The friend said he watched in horror as the suspect shot the man and then turned the gun on the woman, shooting her several times as she tried to get away.
The friend said the suspect turned to him and said "It was self-defense" before walking over to the woman and shooting her point-blank in the head.
Investigators were trying to determine if the shooter had a relationship with the victims and if the victims lived in the area.