It is credited to engineer James Watt, also credited with inventing the steam engine. To convince potential buyers of the value of his steam engine, he devised a way to rate its power by comparing it to the work done by horses, which was a comparison people at the time could relate to.
Watt watched horses at work, but no on is sure of what he observed. He may have observed ponies lifting coal in a coal mine or horses working in a mill. He concluded that a horse could lift 550 pounds at the rate of one foot per second. In other words, it could lift 33,000 pounds one foot per minute. And that's the figure we use today: one unit of horsepower equals 33,000 foot-pounds per minute.
Hope that answers the question.