many historians believe the cake originated in the middle ages when sugar and other sweeteners were scarce. (carrots were used as a substitute.) the earliest known recipe for carrot cake can be found in a french cookbook published in 1827.