On land, humans have domesticated numerous animals and a large number of these (horses, donkeys, camels, elephants, various types of cattle, etc) are used for transporting goods and people. Have there been historical attempts at domesticating marine mammals or large fish to pull boats in a manner similar to carts/chariots on land?
It's impossible to prove a negative and say that it never happened...that said, there are going to be some practical reasons which make that unlikely.
Control. If it can dive, you can't control it. It's not like a horse...if my whale is hanging out down below, what am I going to do? If I crack the whip when it comes up to breathe, it can just dive again.
In addition, any creature large enough to pull a boat or ship will be large enough to be extraordinarily difficult to keep under control, even under the best of circumstances.
Finally, diet...leaving aside the fact that most cetaceans don't adapt well to captivity, feeding them adequately is insanely expensive even at the best of times. In pre-modern times? Forget it.
Tangentially related to your question, there are recorded cases of harpooned whales towing whaleboats for miles before finally succumbing. With the caveat that a whaleboat was significantly smaller than a full whaling ship.
There are also stories told of blue whales that could tow a full whaling ship for miles before succumbing to the harpoon, but I'm not aware of any that have been verified
http://americanhistory.si.edu/onthewater/exhibition/3_7.html