It was a scene straight out of the 19th century: a whaling ship sailing into Buzzards Bay, bound for New Bedford.

But this was late June 2014. On a hazy day, the Charles W. Morgan, the last remaining wooden whaling ship, returned to her former home port, the place where she was built in 1841.

“She literally came out of the mist at Quick’s Hole,” the ship’s historian, Matthew Stackpole, said this week. “If you think of an image of a ship coming from the past to present, it was that kind of entry. It was just spine-tingling. Here she comes with the same keel that was laid in January 1841 . . . behind her was a ghost fleet of 2,700 ships. The mist that day was the perfect environment to imagine that.”

The New Bedford homecoming was one stop of many on the Charles W. Morgan’s historic 38th voyage. Over 82 days this summer, the wooden whaling ship was back to life, sailing familiar waters and symbolizing the country’s maritime history for thousands of visitors.

The Charles W. Morgan as she sailed into Vineyard Haven harbor in June. — Ivy Ashe

For a week in June, the Charles W. Morgan was anchored in Vineyard Haven harbor — a nod to the Vineyard’s own whaling history, which includes several ties to the Morgan.

The 38th voyage was made possible by an extensive, multi-million dollar restoration at Mystic Seaport, where she has now returned after her historic trip.

“It was such an amazing summer and so many remarkable things happened on the voyage,” Mr. Stackpole said. “We had really high goals and expectations for the whole thing and I can say that in every case and everywhere what happened exceeded our expectations.”

The voyage began in the spring when the Charles W. Morgan sailed for the first time in nearly a century. The ship was first launched in July 1841, and sailed on 37 whaling voyages over 80 years. She last sailed on a whaling trip in 1921.

After her restoration, Mystic Seaport took the bold step of having the ship sail again. While once the ship sailed on multi-year voyages around the world in search of whales and valuable whale oil, the mission this time was to raise awareness about maritime history and ocean conservation.

In May, the ship departed from Mystic with Capt. Richard (Kip) Files of Maine at the helm. The Morgan stopped at seven ports of call, including New London, Conn., and Newport, R.I.

On June 18, the Charles W. Morgan sailed for the first time into Vineyard Sound. While many of her captains and members of her crew were from the Island, the ship had never visited the Vineyard. Her arrival was heralded by crowds gathered along the north shore and Vineyard Haven harbor to get a glimpse or a photograph of a whaling ship under sail.

Matthew Stackpole and Capt. Kip Files aboard the Morgan. — Mark Lovewell

When the ship passed Cuttyhunk, she sailed right by the spot where the second to last whaling ship, the Wanderer, wrecked in 1924. “Who could have imagined in August 1924 that the Morgan could still be in existence, be sailing, be sailing by the spot where the Wanderer wrecked,” Mr. Stackpole said.

“This was a restoration,” he said. “But we didn’t know it til we experienced it, but it was a resurrection, too, because the ship had life again and was sailing for the first time down Vineyard Sound.”

The Morgan docked at Tisbury Wharf to a chorus of cheers, boat horns and cannon fire.

On the Vineyard, as in other places, “it was very emotional, almost visceral,” Mr. Stackpole said.

“We couldn’t have done this voyage without Ralph Packer,” Mr. Stackpole added. The owner of Tisbury Wharf donated a tug boat and a crew for the entire trip.

During the four days she was open to visitors on the Island, 7,822 people visited the ship and a dockside exhibit.

The Charles W. Morgan was known as a lucky ship; she was profitable and avoided the ill fortune of other whaling ships, including shipwrecks and Confederate raiders. It seems the Morgan magic was there for the 38th voyage as well.

Capt. Kip Files throws out the first pitch at a Red Sox game. — Courtesy Mysic Seaport

At Stellwagen Bank National Marine Sanctuary off Cape Cod, the old whaling ship sailed peacefully alongside whales. In a symbolic gesture, a whaling boat was lowered, and whales swam directly below the smaller boat. Jean-Michel Cousteau, the son of legendary oceanographer Jacques Cousteau, was aboard the ship, Mr. Stackpole said, and said it was two of the greatest days of his life.

There was the emotional return to New Bedford, where the Morgan sailed in at seven knots and then tied up near where she used to return from whaling voyages.

In New Bedford, the Morgan also braved an early season storm, as Hurricane Arthur came up the eastern seaboard. Mystic Seaport had a contingency plan in case of a hurricane, Mr. Stackpole said, and that plan was to go to New Bedford, which has a hurricane barrier. Despite eight inches of rain, the Morgan was perfectly safe, Mr. Stackpole said. And 600 people came to see the ship between 9 a.m. and noon on July 4, despite the hurricane.

In Boston, the Morgan docked next to the USS Constitution at the Charlestown Navy Yard. The two oldest American ships were side by side for the first time.

The USS Constitution Museum honored Mystic with the Turner Award, which recognizes major restoration efforts of national impact, Mr. Stackpole said. Coincidentally, the award was given on July 21, the date the Morgan first sailed back in 1841. “The ship is magic,” he said. “And she was again.”

The Red Sox honored the Morgan at Fenway Park. Captain Files threw out the first pitch.

When the Morgan first sailed, it was the first time anybody alive had sailed on a whaling ship. It was also the first time color photographs were taken of a whaling ship under sail.

The Charles W. Morgan returns to Mystic. — Courtesy Mystic Seaport

Voyagers joined the crew on different legs of the trip, including scientists, poets, teachers, Melville scholars, artists and oceanographers. Mystic is beginning to harvest everything gained from the voyagers, Mr. Stackpole said.

The great-grandson of Herman Melville was aboard as was the great-great-grandson of Charles W. Morgan, the ship’s original owner and namesake.

The Charles W. Morgan returned to Mystic on August 6. Coming up Mystic River, crowds yelled welcome home and sang God Bless America, Mr. Stackpole said. The ship is now back in her berth at Chubb’s Wharf at Mystic Seaport, where more than 21 million people have visited her over the years.

There are no barrels of whale oil to unload this time, but instead a wealth of new information to digest.

“Now we have a whole new body of knowledge about her,” he said. “We know how she sails . . . not only did she sail, but she sailed well and easily.”

The crew returned with “new vigor and new insights and experienced things to share,” he added.

“It was great for all of us and I think it was great for her,” Mr. Stackpole said. “I think the ship was happy.”

And one key member of the Morgan crew is taking a permanent shore leave. Mr. Stackpole, a Vineyard resident, is leaving Mystic and coming home to the Island full time. “This has been a remarkable voyage for me,” Mr. Stackpole said. “It’s really poignant.”

At rest at Tisbury Wharf. — Timothy Johnson

His last official day at Mystic will be Friday, August 29.

Mr. Stackpole’s own history has been intertwined with whaling and Mystic Seaport. His ancestors were whalers, and his father, Edouard Stackpole, was curator at Mystic Seaport and wrote a book about the Morgan.

Mr. Stackpole said he has approached his time at Mystic as a whaling voyage. Now, he said, it is time to come home.

“I’ll always be here. My relationship with the museum is ongoing,” he said. “It’s just that I want to come home, I want to come back to my community.

“The real hero of the story is my wife Martha, who was relentlessly supportive of what I was doing, which made it possible,” he said.

Before the 38th voyage, all agreed this would be the only time the restored ship would sail.

“I think what we’re saying now is that’s still our basic thinking,” Mr. Stackpole said. “But never say never, because we got so much out of it that we didn’t know we were going to get out of it.

“Never say never. For the right reasons and the right moment.”