Evidently, Joe Manchin is not your typical Democrat. Manchin is probably the "only Democrat" who can retain the Senate seat for his party and his electoral success has often been profiled about.
A detailed Politico Magazine profile broadly summed up his electoral success as follows.
He won because of his singular combination of longevity, familiarity and conviviality, according to aides and advisers, critics and advocates, local political experts and voters across the ideological spectrum. In addition to the benefit of a flawed opponent in Patrick Morrisey, they told me, Manchin brought to the race what he always does—an uncommon face-to-face skill set, an uncanny knack at reading public sentiment, and a keen and exacting political calculus. “Joe Manchin is the best retail politician I’ve seen other than Bill Clinton,” said Patrick Hickey, a political scientist at West Virginia University. “He knows West Virginia, and West Virginians,” added Booth Goodwin, a former United States attorney and a Democrat who ran for governor in 2016, “and he knows what is of interest to them—intuitively.”
– "How the Most Endangered Democrat in America Survived"
First and foremost, it is important to make clear that Manchin is not immune to the shifting political tides in his state. During his first run for governor, Democrats still held a trifecta in WV. As the state trended Republican, Manchin garnered his lowest ever vote share in his latest 2018 election, prevailing narrowly in what could be his last term in the Senate.
Nevertheless, here are a few specific reasons why Manchin could win in a state trending Republicans that I usually come across:
Manchin is quite moderate and politically independent. According to FiveThirtyEight's tracker, Manchin voted according to Trump's position 50.4% of the time (the most of any Democrats still serving in the Senate). He voted for both Gorsuch (along with 2 other Democrats) and Kavanaugh (was the only Democrat to do so). His vote for Kavanaugh was later credited for his narrow victory in his 2018 election. (According to exit polls, 55% of Manchin voters in 2018 noted that his "Kavanaugh vote [was] a factor".)
In a socially conservative, largely anti-abortion-rights state, Manchin's last-minute -- and, critics said, calculated -- vote may have made a big difference.
Manchin is also socially conservative. He had also obtained an "A" rating from the NRA during his 2004 run for governor and 2010 and 2012 runs for Senate (though he had a "D" for his 2018 election).
Another example of his political independence is his endorsement of Republican Senator Susan Collins for her 2020 reelection race.
Manchin pulled this off by establishing a brand of political independence. During his first Senate campaign in 2010, he bragged in an ad that he’d “protect our Second Amendment rights” and “get the federal government off our backs,” that he would “cut federal spending,” that he’d sued the Environmental Protection Agency — and topped it off by shooting Democrats’ cap-and-trade bill. With a gun.
The Vox article referred to Manchin's "dead aim" ad for his 2010 Senate election where he shot a copy of Democrats' then cap-and-trade bill (to express his political independence and his support of WV's coal industry). The ad later went viral.
Taken alone, each part of Manchin's pitch makes sense. Cap and trade, the proposal to place a limit on carbon emisssions in order to reduce climate change, is unpopular in West Virginia because of the state's prominence as a coal producer. Gun rights, says Beller, "are very critical in this state.
West Virginia was not that Republican during Manchin's first few runs for office. In the 2000s, the state still largely voted Democrats for most statewide offices and Democrats held majorities in both state chambers. It was only until 2014 when the Republicans took control of the state legislature after 83 years of Democratic control of the state House.
Hence, this meant that during Manchin's first few runs for governor, he was running in a dominantly Democratic state, explaining his initial electoral success.
Furthermore, the high correlation between federal and state elections is relatively new. Split-ticket voting in federal and state wasn't that uncommon in the previous decade. See this WaPo analysis.
Manchin is well-known and well-liked in West Virginia.
Manchin’s roots in West Virginia are deep. He grew up in coal country, one of five children and rose through the state’s politics first through the West Virginia house of delegates, then the state senate, then the secretary of state’s office, then the governor’s mansion, then the Senate.
Incumbency also played a part in Manchin's recent electoral success.
Furthermore, while his approval ratings have fluctuated in recent years, he was in fact, even more popular than Trump in 2017 and his appeal cuts across party lines. From GQ:
The cultural gulf between Washington and West Virginia is vast, but geographically they're pretty close. As a result, Manchin's Senate office in D.C. features a stream of constituents dropping in, often unannounced, to say hello. Manchin doles out hugs and schmoozes with as many of them as he can, listening to their concerns. “We're retail government,” he explains. “It's customer service.”
Articles worth to read: