NEW YORK – Eleven months ago, after losing a listless unanimous decision against Diego Sanchez, Jim Miller was contemplating walking away from fighting at just 32 years old. His grand design, what he was planning in the abstract, was to potentially say goodbye to MMA at UFC 200 after his fight with Takanori Gomi. But before he did that, he figured out what the problem was.

He was diagnosed as having Lyme disease, an infectious bacterial disease that results in, among other things, extreme enervation and fatigue.

Miller was able to take out Gomi in just 2:18 of the first round via TKO. And by the time he did, he was already in the process of getting his condition under control. He returned against Joe Lauzon the following month and won a split decision at UFC on FOX in Vancouver. Then, when the UFC made its big entrance to New York at UFC 205 in November, Miller put on his best performance of the year.

He defeated Thiago Alves via a unanimous decision.

Miller’s 2016 was a complete 180-degree turnaround from where he was through 2015. And in early 2017, he is back in New York looking to make it four wins in a row. This time he’ll be facing Dustin Poirier to open the UFC 208 pay-per-view at the Barclays Center.

And to paraphrase Nate Diaz, whom Miller fought nearly five years ago in New Jersey, he ain’t surprised by his sudden resurgence.

“I knew I had it in me,” he told MMA Fighting at the UFC 208 media day on Wednesday. “It was just getting things right, getting healthy again. Man, 2015 was not easy. It was the little things when you think about it. It was not so much the fights. It was just doing my daily things with my family and with the gym, it was just really difficult. And it wasn’t so much just the physical side of it. Yeah it was hard to get out of bed, it was hard to move, every time I stood up it hurt. I was like an old man, going up and down the stairs sideways. It was stupid.

“But mentally it was difficult to deal with. I’m just happy that I kind of got it figured out. I’m not out of the woods yet with the Lyme.”

Miller has been taking medication to treat the disease. Before his last fight with Alves, though, he went off the medication, and began to feel it creeping back over him.

“I actually had a second round of it come around, basically right before that last fight,” he said. “I was off medical for a couple weeks, like six or seven weeks, and I started to notice the early symptoms right before the fight, and I was like, alright, let’s get through it. I feel good.

“One of the symptoms is you get muscle spasms and stuff like that. For like three days my left eye was twitching and I was like, ahh sh*t.

“And because I’m self-hating, basically, I was like, let’s see how long it takes for me to feel like sh*t. And it was like three weeks, and I was like oh man, I was hurting. But I’m back on the medications.”

Miller will be fighting in his 25th UFC fight on Saturday night (17-7-1), a remarkable run for a guy who has faced a who’s who using a furious style that has earned him some bonus money over the years. His longevity is remarkable in its own right.

His best run occurred between 2009-2011, when Miller rattled off seven consecutive wins en-route to a fight with Benson Henderson. He ended up losing that bout via a unanimous decision. Between 2012-2014, Miller went 3-0-(1), and looked poised to position himself in the title picture. Yet he lost the next four out of five, with the last couple of fights — particularly the Sanchez bout at UFC 196 — directly affected by his condition.

Now he faces Poirier, who — after winning four in a row as a lightweight — is coming off of a knockout loss against Michael Johnson. Poirier has never lost back-to-back fights, and Miller says he knows the Louisiana native will be fighting tooth-and-nail to avoid having that happen this time through, too.

“I was excited for it,” he said. “He’s a tough, dangerous dude. I get excited when I fight guys that I know are a threat. So yeah, I’m feeling the fight. It was one of those ones where it was five minutes in an email conversation back and forth. It was the last time I was working with [former matchmaker] Joe Silva, and it was like midnight when he emailed me. He said, ‘Dustin at 208?’ And like two seconds later I was like, ‘yup, let’s do it.”

Miller says he sees in Poirier the kind of guy who will accommodate him in a fun fight.

“I see someone who goes in and fights as hard as he can fight every time he goes in there,” he said. “I appreciate that. Because it’s not easy. There are bad nights and getting hit sometimes, it hurts, and it makes you kind of want to take it safe. But he definitely doesn’t do that.”

Now 33 years old and feeling better, Miller says retirement is far from his thoughts. “Winning sure as hell makes it a lot easier,” he laughed.

He said that whatever renewed sense of self he’s feeling actually plays back to the familiar original idea of why he got in the sport to begin with.

He wants to be regarded as the best.

“I do care,” he said. “I don’t obsess about it, but the goal has always been to be recognized as the best. I know that I can beat anyone on the planet that fights at 155, it just comes down to the night. I’ve had to deal with a lot of bullsh*t. But I’m excited, because I feel good again. I feel like I’m supposed to feel.”