The children were handed over to employees of the German consulate, in Iraq's northern city of Erbil, who were at the border with Syria, a spokeswoman for Germany's Foreign Ministry said.
Foreign Minister Heiko Maas said in Berlin that the German government is working under difficult circumstances to bring more children of Islamic State fighters back to Germany. "We will engage to ensure that more children can leave Syria," Maas said.
"This is mostly about young children, and their placement there is everything other than optimal," Maas said. "They also cannot be held responsible for the actions of their parents, and that is why we want to help," he added.
The four children are three orphans - two girls and a boy - and a 6-month-old baby girl who is very sick, Abdel Karim Umer, head of foreign relations in the Kurdish administration, told dpa. The baby has a tumour in her head and needs immediate treatment, he said.
The Kurdish official said there were negotiations to take one more person but gave no further details.
The children were living in north-eastern Syria's al-Hol camp, home to nearly 74,000 people.
According to dpa sources, the four children will fly from Erbil to Germany and be accompanied by their grandparents. The mother of the 6-month-old continues to live in the refugee camp with her other children.
The matter of returning children of Islamic State fighters has long been controversial in Germany. The government has in the past pointed to the lack of diplomatic representation in Syria as a reason not to get involved.
A Berlin court last month disagreed, saying Germany's Foreign Ministry must provide support for relatives of Islamic State fighters who are German citizens to be brought back.
The children were among Islamic State families who had surrendered to the US-backed Syrian Democratic Forces (SDF) during battles against the extremist group in eastern Syria, Kurdish sources said.
According to the Rojava Information Centre, an estimated 117 children with German citizenship are in north-eastern Syria, as well as dozens of German women and 66 men, more than 40 of whom are accused of war crimes. The German government has in the past estimated 68 women and more than 120 children in the region.
The head of the Britain-based Syrian Observatory for Human Rights, Rami Abdel-Rahman, cited Kurdish sources as saying foreigners being held by the SDF included just 13 German men and 21 women, along with 48 children whose parents are German nationals.
Fenr Gayatal, from the Kurdish External Relations Bureau who oversaw the repatriation on Monday, said: "We have announced that there are 8,000 children here, from 50 different countries."
In March, SDF announced the defeat of Islamic State and seized the militant group's last stronghold in eastern Syria after months of fighting. The fate of foreign Islamic State fighters and their families has become a pressing issue for the SDF.
The SDF have been calling on the United Nations to establish an international court to try foreign jihadists. They say that they have arrested around 1,300 foreign jihadists in total, excluding Iraqis.
--------------------------------------------------------------------------------------------------------