It was after the battle of Belmont, JPK. Here's a snippet of the incident in Ulysses own words:
"From the beginning of the fighting our wounded had been carried to the houses at the rear, near the place of debarkation. I now set the troops in bringing their wounded to the boats. After this had gone on for some little time I rode down the road, without even a staff officer, to visit the guard I had stationed over the approach to our transports. I knew the enemy had crossed over from Columbus in considerable numbers and might be expected to attack us as we were embarking. This guard would be encountered first and, as they were in a natural intrenchment, would be able to hold the enemy for a considerable time. My surprise was great to find there was not a single man in the trench. Riding back to the boat I found the officer who had commanded the guard and learned that he had withdrawn his force when the main body fell back. At first I ordered the guard to return, but finding that it would take some time to get the men together and march them back to their position, I countermanded the order. Then fearing that the enemy we had seen crossing the river below might be coming upon us unawares, I rode out in the field to our front, still entirely alone, to observe whether the enemy was passing. The field was grown up with corn so tall and thick as to cut off the view of even a person on horseback, except directly along the rows. Even in that direction, owing to the overhanging blades of corn, the view was not extensive. I had not gone more than a few hundred yards when I saw a body of troops marching past me not fifty yards away. I looked at them for a moment then turned my horse towards the river and started back, first in a walk, and when I thought myself concealed from the view of the enemy, as fast as my horse could carry me. When at the river bank I still had to ride a few hundred yards to the point where the nearest transport lay.
The cornfield in front of our transports terminated at the edge of a dense forest. Before I got back the enemy had entered this forest and had opened a brisk fire upon the boats. Our men, with the exception of details that had gone to the front after the wounded, were now either aboard the transport or very near them. Those who were not aboard soon got there, and the boats pushed off. I was the only man of the National army between the rebels and our transports. The captain of a boat that had just pushed out but had not started, recognized me and ordered the engineer not to start the engine; he then had a plank run out for me. My horse seemed to take in the situation. There was no path down the bank and every one acquainted with the Mississippi River knows that its banks, in a natural state, do not vary at any great angle from the perpendicular. My horse put his forefeet over the bank without hesitation or urging, and with his hind feet well under him, slid down the bank and trotted aboard the boat, twelve or fifteen feet away, over a single gang plank. I dismounted and went at once to the upper deck."
Here is Grant giving credit to his horse, rather than taking it to himself, for this amazing feat. There is no doubt they are intelligent animals and this one seemed to know instinctively what it needed to do. It doesn't appear Grant had to urge it on at all.