A third case of the O157 strain is also being investigated at the premises in Kirkwall, Orkney, but the health board said there was "no strong evidence" they were infected at the nursery.
One child is being treated in hospital while the other child, described as "a household contact" of the first, is not showing symptoms.
The third child is at home.
NHS Orkney said other children and staff from the nursery are being screened as a precaution.
The board's director of public health, Louise Wilson, said: "It must be stressed this is purely a precautionary measure. We understand that parents of children who attend this nursery will be concerned and we want to set their minds at rest.
"Parents will be contacted directly by the nursery."
The E.coli O157 bacterium lives in the gut of animals such as cattle, sheep, deer and goats. It can also be carried by pets and wild birds. In humans, it can cause diarrhoea and kidney failure as well as other illnesses. Young children and older people are said to be at greatest risk.
Dr Wilson said: "One of the simplest things that can be done to prevent infection is to wash your hands thoroughly after using the toilet or changing nappies, and before preparing or eating food and after contact with animals or their environment."
In August six cases of the strain were confirmed on the island.