The Carlson family had just gone to bed when their neighbor, Pete Valenti, started pounding on the door of their McHenry County home.
Everyone rushed to the barn to try to get the animals out but they weren't able to save four baby goats.
Several different departments responded and said it took 21,000 gallons of water to put the fire out.
The fire caused tens of thousands of dollars in damage to the farm near the town of Union.
The family said they are still trying to figure out where to keep their animals until the barn is fixed.
The cause of the fire is under investigation.