The suspect eluded police officers for several hours before being arrested in a house.
According to US officials, a 15-year-old boy has been arrested on suspicion of killing five people in North Carolina and is in critical condition in a hospital.
The unidentified teenager is accused of fatally shooting two individuals in the state capital of Raleigh before opening fire on a walking route, killing three more people and injuring two others.
Among those killed in the Thursday night attack were a 16-year-old boy named James Roger Thompson, and a 29-year-old off-duty police officer called Gabriel Torres.
The other victims killed in the shooting were 52-year-old Nicole Connors, 34-year-old Mary Marshall, and 49-year-old Susan Karnatz.
Marcille Lynn Gardner, 59, was wounded in the attack and remains in critical condition in the hospital, while a second police officer, Casey Joseph Clark, was also injured but has been released.
Raleigh police chief Estella Patterson said those killed were a racially diverse group, and authorities have not yet determined a motive for the shooting.
The incident set off a massive police response across the city, with officers searching for the suspect for several hours before cornering him inside a house and arresting him.
Officers from numerous law enforcement agencies swarmed the Hedingham neighbourhood, a residential area northeast of Raleigh city centre, closing roads and warning residents to stay inside while they searched for the shooter.