The following strange account was published in the San Francisco Call on November 27, 1896:
There is a haunted vessel in Oakland Creek. The watchman asserts that the ghost is harmless, but those who have been on the vessel for several trips say that the "spook" comes along as regularly as Thanksgiving. Some years ago the vessel was in Honolulu, and at that time the Hawaiian Star said: "The men in the forecastle see the ghost of Captain Williams frequently. Off Molokai the night before the Occidental was towed to the Pacific Mail dock there was a great commotion forward. The man on watch and two other men who hurried above when he called declare they saw Captain Williams on deck. They give a perfect description of the dead man. They say he looked ahead intently for several seconds, turned as if to give orders, uttered a short agonizing groan, staggered amidships and disappeared. Every man forward corroborates this account."
Captain Williams is the restless spirit and he was murdered on the forward deck of the Occidental nearly nine years ago. The vessel was on her way from Liverpool to a South American port with a mixed crew. There was trouble almost from the start and the captain had to be constantly on the watch. One moonlight night when everybody was below, or supposed to be, Captain Williams went forward to see if everything was snug for the night. One of his men who thought he had been abused thrust a knife into his back as the captain turned to go forward. The blade pierced his heart, and Williams, after casting an agonizing glance around, dropped dead. His murderer is now serving a life sentence in San Quentin. He and some of his accomplices were turned over to the American Consul at Callao and sent to San Francisco. Their trial resulted in the acquittal of all except the man who is now in the State prison. In spite of the ghost the Occidental has been one of the most successful vessels trading in and out of the Golden Gate. Latterly there have been no charters in sight and she has been tied up in Oakland Creek.
Watchmen pooh-pooh the idea of a ghost, but, nevertheless, those who know assert that about Thanksgiving time the ghost of Captain Williams appears on the forward deck and the scene of the killing is again enacted. The Occidental is one of the staunchest vessels in the American marine. She has been for years on the coast. Many of the old pilots and sea captains remember Captain Williams as one of the brightest and best of the old-time skippers.
I'm not positive that there was an actual 'ghost' of Captain John Williams, but it is true that he died on the Occidental:
The Daily Morning Republican, Fresno, California, May 4, 1888––The jury in the case of John Johnson, the seaman charged with the murder of Captain John Williams on the ship Occidental in March 1887, found him guilty of manslaughter today. The jury returned a verdict after six hours’ deliberation. Johnson will be sentenced Monday.
I found an entry in AMERICAN MERCHANT SHIPS 1850-1900, SERIES ONE AND TWO (2 volumes) that referenced Captain Williams' final voyage:
TIME-LIFE Mysteries of the Unknown: Inside the World of the Strange and Unexplained
Pirates: The Complete History From 1300 Bc To The Present Day
Ghosts: A Natural History: 500 Years of Searching for Proof
Shipwrecks, Monsters, and Mysteries of the Great Lakes