Rotherham Borough Council said the children were "not indigenous white British" and that it had concerns about UKIP's stance on immigration.
It said it had to consider the "needs of the children longer term".
The unnamed couple told the Daily Telegraph social workers had accused them of belonging to a "racist party". UKIP said it was an appalling decision.
Rotherham Borough Council's Strategic Director of Children and Young People's Services, Joyce Thacker, told the BBC that her decision was influenced by UKIP's immigration policy, which she said calls for the end of the "active promotion of multiculturalism".
UKIP's immigration policy states the party wants an "end [to] the active promotion of the doctrine of multiculturalism by local and national government", and urges Britain to leave the European Union (EU).
The Labour Party has called for an investigation into the Labour-run council's decision, after claims from UKIP it could have been politically motivated.
The couple, who have been approved foster parents for seven years, were eight weeks into the placement when they were approached by social workers about their membership of the party.
The wife told the Daily Telegraph: "I was dumbfounded. Then my question to both of them was, 'What has UKIP got to do with having the children removed?'
"Then one of them said, 'Well, UKIP have got racist policies.' The implication was that we were racist. [The social worker] said UKIP does not like European people and wants them all out of the country to be returned to their own countries."
The paper says the woman denied she was racist but the children were taken away by the end of the week.
She said the social worker told her: "We would not have placed these children with you had we known you were members of UKIP because it wouldn't have been the right cultural match."
The couple said they had been "stigmatised and slandered".
Ms Thacker said she did not regret the decision, which was reached after "a lot of soul searching".
"These children are not UK children and we were not aware of the foster parents having strong political views. There are some strong views in the UKIP party and we have to think of the future of the children."
She added during an interview with BBC Radio 4's Today: "I have to look at the children's cultural and ethnic needs.
"I have legal advice I have to follow for the placement of children and I was criticised before for not making sure their cultural and ethnic needs were met.
"If the party mantra is, for example, ending the active promotion of multiculturalism I have to think about that... I have to think of their longer-term needs.
"I don't think [UKIP] are a racist party... I think they have very clear immigration and policies and I have to take all those factors into account."
She added that the children were placed with the family temporarily and were never intended to stay with the family long-term.
The council said there was no blanket ban on UKIP members being foster parents and that this couple would be allowed to foster other children in the future.
UKIP leader Nigel Farage condemned the decision and said the council had many questions to answer.
He told the BBC he felt: "Very upset and very angry... this couple involved who have been fostering for many years and are very decent people. This was an awful shock to them, not to mention the upset for the children themselves.
"Politically, I am not surprised at all. This is typical of the bigotry you get from the Labour party and Labour controlled councils.
"We have nothing against people from Poland or elsewhere in the world... we are not against immigration. We believe in controlled immigration."
He added in a statement: "They [the council] have to look at themselves in the mirror and ask who it is that is prejudiced? A normal couple who have fostered for seven years, or themselves who are blinded by political bias?
"Publicly they must make absolutely clear the decision-making process in this case, who was responsible for this decision and why."
In a statement, Labour said: "Membership of UKIP should not block parents from adopting children. There needs to be an urgent investigation by Rotherham Borough Council into this decision."
UKIP describes itself as a "Libertarian, non-racist party seeking Britain's withdrawal from the European Union".
It currently has 12 MEPs and 31 councillors, with three peers in the House of Lords.
OP: While I fundamentally disagree with UKIP (though I find Nigel Farage occasionally entertaining in a village idiot sort of way), this is deeply worrying. Where does it all end? And surely because they have no problem adopting "not indigenous white British" kids they're not all that hardcore anyway. What did the council think they'd do, kill them so there were less immigrants?!