The woman, a gunner in the Royal Artillery, had complained of stomach pains before medics informed her she was in labour.
She gave birth to a son five weeks premature in Camp Bastion on Tuesday.
Mother and baby are both said to be in a stable condition, with a specialist paediatric team from the John Radcliffe Hospital, Oxford, preparing to travel to Afghanistan to assist them on the flight home.
The Ministry of Defence last night confirmed it was against military policy for servicewomen to be deployed on operations while pregnant and said they had been unaware the servicewoman was expecting.
It is the first time a soldier from the UK has given birth while in Afghanistan.
The gunner, who has not been named, had been deployed with the 12th Mechanised Brigade since March and had not been aware she was carrying a child, according to the Daily Mail newspaper.
It is understood the baby had been conceived before she flew to Afghanistan to begin the six-month tour. The gunner was in her 34th week of pregnancy when she went into labour.
The Mother, reported to be originally from Fiji, and baby are being cared for at the Camp Bastion Field Hospital until they are able to safely fly home to Britain.
She is said to have passed fitness tests and training, including a eight-mile run with a 25lb backpack.
A spokeswoman for the Ministry of Defence last night said: “We can confirm that on 18 September 2012 a UK servicewoman serving in Afghanistan gave birth in the Camp Bastion Field Hospital to a baby boy.
“Mother and baby are both in a stable condition in the hospital and are receiving the best possible care.
“A specialist Paediatric Retrieval Team is being prepared and will deploy in the next few days in order to provide appropriate care for mother and baby on the flight home."
She added: “It is not military policy to allow service women to deploy on operations if they are pregnant. In this instance the MOD was unaware of her pregnancy.
“As with all medical cases, when the need arises, individuals are returned to the UK for appropriate treatment and care.”
Two US Marines were killed and unprecedented material damage caused when attackers armed with guns, rockets and suicide vests stormed the base - where Prince Harry is also located - last Friday.