The captain was showing off -- sailing around, "vaingloriously" as Melville puts it, putting on a show for other less fortunate whalers. We get a wildly exaggerated description of what such a bonanza might consist: "In the forecastle, the sailors had actually caulked and pitched their chests, and filled them [with sperm oil]; it was humorously added that the cook had clapped a lid on his largest boiler, and filled it; that the steward had plugged his spare coffee pot and filled it; that indeed everything was filled with sperm, except the captain's pantaloons pockets, and those he reserved to thrust his hands into, in self-complacent testimony of his entire satisfaction. On the quarter-deck, the mates and harpooneers were dancing with the olive-hued girls who had eloped with them from the Polynesian Isles; while suspended in an ornamented boat, firmly secured aloft between the foremast and the mainmast, three Long Island negroes, with glittering fiddle-bows of whale ivory, were presiding over the hilarious jig. Lord and master over all this scene, the captain stood erect on the ship's elevated quarter-deck, so that the whole rejoicing drama was full before him, and seemed merely contrived for his own individual diversion." [What a contrast could be drawn between this captain and Ahab!]
"And Ahab, he too was standing on the quarter-deck, shaggy and black, with a stubborn gloom; and as the two ships crossed each other's wakes -- one all jubilations for things passed, the other all forebodings for things to come -- their two captains in themselves impersonated the whole striking contrast of the scene."
"'Come aboard, come aboard!' cried the gay Bachelor's commander, lifting a glass and bottle in the air."
"'Hast seen the White Whale?' gritted Ahab in reply."
"'No; only heard of him; but don't believe in him at all,' said the other good-humoredly. 'Come aboard!'"
"'Thou art too damned jolly. Sail on. Hast lost any men?'"
"'Not enough to speak of -- but come along, old hearty, will ye (merry's the play).'"
"'How wondrous familiar is a fool!' muttered Ahab; then aloud, 'Call me an empty ship and outward bound. So go thy ways, and I will mine.'"
"And thus, while one ship went cheerily before the breeze, the other stubbornly fought against it; and so the two vessels parted. And as Ahab eyed the homeward-bound craft, he took from his pocket a small vial of sand, and then looking from the ship to the vial, seemed thereby bringing two remote associations together, for that vial was filled with Nantucket soundings."
That vial filled with Nantucket sand represents the home he'll never see again.