Now, more than six months later, Trump has decided against locking up his Democratic opponent as he had repeatedly promised, and instead fired FBI Director James Comey yesterday. In doing so, his Administration pointed to that same October 28 letter as evidence that Comey had mishandled the investigation of Clinton and is not suited for the job.
The decision - which comes amid an FBI investigation of ties between Trump's campaign and Russian officials - shows once again that Trump is more than willing to take whatever position or action will serve him well in the moment, even if it contradicts his earlier positions.
"When it comes to strategy, he's like a day-trader on crack," said John Weaver, a Republican strategist who has worked on the GOP presidential campaigns of Senator John McCain and Ohio Governor John Kasich. "There's no central thread in their messaging . . . It's always: 'What do we have to do to get through this?'"
On the campaign trail, Trump routinely took numerous positions on a single issue, allowing his supporters to select whichever one they liked best and blaming the media for any confusion. Since taking office, Trump has abandoned many of his campaign promises with little explanation.
Trump has wavered on whether Comey was a good guy or not. In April 2016, Trump said that he heard "fantastic things" about Comey. Two months later in July, as Comey recommended not charging Clinton, Trump slammed the decision and called the system "rigged".
Three weeks before the election, Trump accused the FBI of "covering up to protect her". But 11 days after that, when Comey reopened the investigation, Trump announced that he has "great respect for the FBI for righting this wrong". At a rally the next day, Trump praised Comey, saying that it "took a lot of guts" to do "the right thing".
Soon after winning the election, Trump said he respects Comey "a lot". At a reception two days after inauguration, Trump warmly hugged Comey and declared him "more famous than me". At one point, Trump even appeared to blow Comey a kiss.
But last week, Trump turned again, tweeting: "FBI Director Comey was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds!" And then came the unexpected firing this week.
Throughout all of this, Trump was steadfast in his support of the investigation into Clinton - applauding the steps Comey took and always calling for more. That is a major reason why Comey's firing this week was so jarring.
As CNN's Anderson Cooper interviewed White House counsellor Kellyanne Conway yesterday, he asked about the inconsistency.
"Why now are you concerned about the Hillary Clinton email investigation when, as a candidate, Donald Trump was praising it from the campaign trail?" Cooper asked.
"I think you're looking at the wrong set of facts here," Conway said. "In other words, you're going back to the campaign. This man is the President of the United States. He acted decisively today."
Cooper cut her off: "That makes no sense. He said one thing as a candidate and now he's concerned as president?"
"It makes complete sense," Conway said.
The White House released the letter that Trump sent to Comey letting him know that he was fired, in which the President provides no detailed reason for the dismissal but notes: "I greatly appreciate you informing me, on three separate occasions, that I am not under investigation".
The rationale comes in a two-and-a-half page memo from Deputy Attorney-General Rod Rosenstein, who criticises Comey's "handling of the conclusion of the investigation of Secretary Clinton's emails" and the former director's "refusal to accept the nearly universal judgment that he was mistaken".
Rosenstein focuses on two key moments: July 5, when Comey announced at a press conference that Clinton should not face charges but also shared "derogatory information" and her, and October 28, when Comey sent the letter to Congress announcing he had come across new emails that may pertain to the investigation.
When news of that letter first broke, Trump was preparing to speak at the rally Manchester, New Hampshire. He dispatched retired Lieutenant-General Michael Flynn to entertain the crowd while he composed a response.
"I love our New England Patriots - man, are they doing good right now. Wow," Flynn said. "Shout out for our Patriots. Unbelievable."
Flynn went on to be the President's national security adviser for 24 days, after which he was fired for misleading the Vice-President and other senior officials about his communications with a Russian diplomat.
When Trump finally took the stage, the crowd was pumped up and ready. There was a new energy in the room.
"Hillary Clinton's corruption is on a scale we have never seen before," Trump said. "We must not let her take her criminal scheme into the Oval Office. I have great respect for the fact that the FBI and the Department of Justice are now willing to have the courage to right the horrible mistake that they made."
But by today, after his firing of Comey had rocked Washington, the new President and his aides were trashing Comey's job performance as a longstanding problem.
"He wasn't doing a good job," Trump told reporters at the White House. "Very simply, he was not doing a good job."