He resigned on Sunday, two days before he was set to start work.

The aborted hire is a parable about how the effort to harness organic online ingenuity, built on distrust of the mainstream media and turned into one of Sanders’s main tactical advantages, can backfire. The campaign, eager to capi­tal­ize on viral enthusiasm, plucked the YouTuber from relative obscurity and prepared to put him on payroll. The offer was made before he had been fully vetted, the campaign’s leadership acknowledged, saying, “It’s clear some of Matt’s prior social media content does not reflect the campaign’s values.”

To Orfalea, the interest in his video showed he had his finger on the pulse of the movement.

“When you see someone you support being misrepresented, that’s what inspires the grass roots,” Orfalea said, explaining why the pro-Sanders video gained so much traction. His aim, he said, is to produce “stuff that’s powerful, that hits people, but that also inspires people and informs people.”

The episode is also a lesson about the dangers of falsified media, which is a focal point of concern about political disinformation. And it became a new front in the highly charged conflict over how much responsibility someone bears for past posts on social media — a quandary facing numerous candidates going into 2020.

Sanders, in his second run for the Democratic nomination, enjoys an online following that dwarfs that of his rivals. The Vermont independent commands the attention of devoted meme-makers, who turn his clarion calls, as well as his quips, into viral Internet campaigns that reach across platforms like Reddit and Twitch and match the energy of President Trump’s online movement.

His team has the digital sais quoi that former vice president Joe Biden might envy as he goes toe-to-toe with Trump and his online empire over deceptive claims about nepotism and foreign dealings.

Crucially, Sanders is also able to turn the enthusiasm into cash, recently raising more than $25 million in the third quarter, fueled by legions of small-dollar donors.

Orfalea’s video promoting Sanders was a vivid illustration of how the 78-year-old’s fans make him go viral, circumventing mainstream gatekeepers to present a more favorable account of their candidate.

“What Bernie does is relay that sense of grievance from his most passionate supporters,” said Ethan Porter, an assistant professor of media and public affairs at George Washington University.

Orfalea in his D.C. home office with Jamil Ludd, 34 (right), who is watching Orfalea’s viral video for the first time. (Sarah L. Voisin/The Washington Post)

From his basement living quarters in northwest D.C., Orfalea put together the video over the course of about three weeks, pairing clips of negative commentary, mostly on MSNBC, with favorable imagery of the senator.

The charge that Sanders is “a not pro-woman candidate” was juxtaposed with a clip of the senator’s rapturous reception at the 2017 Women’s March. The notion that Sanders “doesn’t actually smile that much” was followed by clips of the senator beaming. In a dramatic close, complaints that Sanders is too loud were interspersed with the verdict of a mother of a diabetic son that “We are not being vocal enough.” The video was set to music from “The Green Mile,” the 1999 fantasy crime drama adapted from the Stephen King novel.

Superimposed on the final minute of the video was a request to viewers: “Please Share.”

And share they did. The video has been viewed nearly 7 million times on Twitter, posted by the activist Shaun King, who was then retweeted by the Sanders campaign’s official account. On Orfalea’s YouTube channel alone, it racked up more than 433,000 views, dwarfing viewership for most of the videos on the campaign’s official channel.

The video, digital strategists said, testifies to the power of independent online actors, who are sometimes best left alone.

“Change happens from organic momentum,” said Keegan Goudiss, Sanders’s director of digital advertising in 2016 and now a partner at Revolution Messaging. “Only individuals who aren’t associated with the campaign can produce that, and then the campaign can tap the best tweets or the best content out there.”

After graduating from the Santa Fe University of Art and Design, which closed last year, Orfalea moved to Los Angeles, where he was an editor with “The Real World” and “Real World/Road Rules Challenge” before an overuse injury brought him back to D.C., where he had grown up, to recuperate.

He concentrated on making his own videos, including about politics, and became enamored of Sanders during his 2016 bid for the presidency.

“Now I’m editing the real real world,” he said, noting the convergence of politics and entertainment and arguing that someone schooled in the ways of reality television could help defeat Trump, who rose to national prominence on “The Apprentice.”

As his video, titled “Rising Up,” picked up steam, a Twitter message arrived from Faiz Shakir, the campaign manager for Sanders. The two exchanged ideas over the phone, Orfalea said, about the “need to make great content.”

He was offered a job and invited to tour campaign headquarters last week. Weighing whether to sign up, he feared only for his “creative freedom.” Campaign staff had already asked that he edit the video, he said, to remove certain figures, including late-night host Trevor Noah, whom they saw as “possible allies,” Orfalea recounted.

When they backed down, Orfalea decided to move ahead with the job, he said.

“Happy to report Faiz and I see eye-to-eye,” he wrote in an email last week. Referring to the senator’s recuperation from a recent heart attack, he added, “I’m joining the squad. Bernie Sanders camp just got some new blood to go with that new heart upgrade.”

On Friday, the campaign shared the video in an email blast to supporters, with the subject line “These folks HATE Bernie Sanders.”

The same day, Orfalea signed a contract, and on Saturday, he recorded a video for his followers, sharing the “big, big news” that he was joining the campaign.

On Sunday, he put the news on Twitter. Within hours, a 53-year-old Sanders critic in New York, Michele Ferrer, dredged up old videos on his channel, which included offensive language and an altered and sexualized rendition of King’s “I Have a Dream” speech.

That evening, Orfalea announced his resignation on Medium, and said the decision to step back was his — made because he didn’t want his past videos to “distract from the real issues.” Of the King video, he wrote, “When I was about 20 yrs old, I edited MLK audio, to expose how easily media can completely misrepresent reality.” He also apologized for using offensive language about people with special needs.

Shakir, in the campaign’s statement, said, “All initial job offers are contingent on the completion of a final review of a person’s record. That vetting process had not yet been completed.”

In the celebratory message to his followers, which may now never go live, Orfalea said he had received scads of notes from viewers about how the video had helped them get through to a family member or friend initially turned off by negative coverage of Sanders.