Zuleika Hassan said she had brought her five-month-old baby with her to work because of a domestic emergency and that parliament didn't have a creche.
According to the house rules, "strangers" are not allowed into the chamber, children included.
Some of her male colleagues described her actions as shameful.
Speaker Christopher Omulele ordered Ms Hassan out of the chamber and said that she could return without the baby.
Some MPs shouted and others started shoving each other.
Ms Hassan called on parliament to create a more "family-friendly atmosphere" if it wanted more women to become MPs.
"I have tried really hard not to come with the baby, but today I had an emergency; what was I supposed to do? If parliament had a nursery or a creche, I would be able to put my baby there," she said.
Deputy speaker Moses Cheboi said in a statement that there is a facility in parliament for mothers to nurse their babies.
However mothers have to "bring along their nannies to watch over the babies at the facility while they undertake their official duties".
In 2017, Kenyan lawmakers passed a bill compelling employers to construct special rooms where mothers could breastfeed and change their babies.
Ms Hassan's supporters have condemned her treatment which comes during World Breastfeeding week.
Several female politicians around the world been pictured taking their babies to work.
In 2018 New Zealand Prime Minister Jacinda Arden was the first female world leader to take her baby, three-month-old Neve Te Aroha, to the United Nations General Assembly in New York.