There are numerous songs in history that are similar to the present day Old MacDonald.
The earliest recorded member of this family of songs may be a number from an opera called The Kingdom of the Birds, published in 1719-1720 in Thomas D'Urfey's Wit and Mirth, or Pills to Purge Melancholy:
In the Fields in Frost and
Watching late and early;
There I keep my Father's Cows,
There I Milk 'em Yearly:
Booing here, Booing there,
Here a Boo, there a Boo, every where a Boo,
We defy all Care and Strife,
In a Charming Country-Life.
In the 1917 book Tommy's Tunes, a collection of World War I era songs by F. T. Nettleingham, the song "Ohio (Old Macdougal Had a Farm)" has quite similar lyrics—though with a slightly different farmer's name and refrain:
Old Macdougal had a farm in
And on that farm he had some dogs in Ohio-i-o,
With a bow-wow here, and a bow-wow there,
Here a bow, there a wow, everywhere a bow-wow.
The Traditional Ballad Index consider the "Tommy's Tunes" version to be the earliest known version of "Old Macdonald Had a Farm", though it cites numerous variations, some of them much older.