A 38-year-old suspect was taken into custody in the western state of Saarland shortly after police issued a wanted notice and shared his photo with the media.
He was arrested by special forces in the town of Sulzbach, Saarland police said in a statement.
A 32-year-old man was separately detained “without resisting arrest” during police searches of several premises, they added.
The shooting happened at around 4.20am on Monday in Rhineland-Palatinate.
The victims – a 24-year-old woman and 29-year-old man – were carrying out checks on traffic in the district of Kusel at the time, police in nearby Kaiserslautern said.
The shooting, for which the motive remains unclear, sent shockwaves through Germany.
Interior Minister Nancy Faeser likened the crime to an “execution” and said it showed “that police officers risk their lives every day for our security”.
Westpfalz police initially said they were hunting for more than one fugitive, at least one of whom was armed.
German police closed off roads and deployed helicopters and sniffer dogs in the hunt for the perpetrator.
Police had also urged residents in the Kusel district not to pick up hitchhikers.
Investigators closed off Kreisstrasse 22 is near Mayweilerhof and Ulmet.
Still in training
According to the investigators, the two officers had been on a routine patrol. They were travelling in a civilian patrol car, but were wearing uniforms.
The early morning shooting occurred on a country road surrounded by forest and fields.
The two officers were able to radio their colleagues for assistance at the scene. Backup police then arrived at the scene and found one officer dead and the other fatally injured.
The young woman who was gunned down was still in police training, according to Rhineland-Palatinate Interior Minister Roger Lewentz.
Germany’s Bild newspaper quoted unnamed sources as saying the two officers had pulled over a “suspicious vehicle” and radioed in to say they had found dead game in the trunk, before shots were fired.
Police said the motive for the shooting remained unknown.
‘Shocked and saddened’
People in Germany have been left stunned by the news.
Federal Interior Minister Nancy Faeser said: “My thoughts are with the families, friends and colleagues of the victims. We will do everything possible to apprehend the perpetrators.”
Marco Buschmann, Germany’s Justice Minister, said: “This terrible act leaves you stunned.”
Germany’s GdP police union expressed its “deep shock and sadness” over the shooting.
“Our thoughts are with the relatives and loved ones of the colleagues who died as a result of an act of violence in the line of duty,” GdP deputy chief Joerg Radek said.
The last time a police officer was killed on duty in Rhineland-Palatinate state was in 2010, when a special task force officer was shot dead by a Hells Angel biker during a raid.
Rhineland-Palatinate state premier Malu Dreyer and interior minister Lewentz also said they were deeply saddened.
“Our thoughts are with the relatives,” they said in a statement. “The crime is horrific. We are deeply shocked that two young people have lost their lives in the line of duty.”