Sen. John McCain, R-Ariz., says his brain cancer diagnosis has given him a sense of freedom to speak his mind in what is his final term in the Senate.

"This is my last term," McCain says in an excerpt of a new memoir set for release next month. "If I hadn’t admitted that to myself before this summer, a stage 4 cancer diagnosis acts as ungentle persuasion."

"I’m freer than colleagues who will face the voters again. I can speak my mind without fearing the consequences much. And I can vote my conscience without worry," McCain writes. "I don’t think I’m free to disregard my constituents’ wishes, far from it. I don’t feel excused from keeping pledges I made. Nor do I wish to harm my party’s prospects. But I do feel a pressing responsibility to give Americans my best judgment."

The Arizona Republican laments about the state of American politics and the rise of politicians unwilling to compromise on issues that must be solved. At one point, he tells readers that they should not support a candidate for Congress who "rides his white horse to Washington" with a partisan agenda.

However, if someone tells you they will build alliances and "split differences where possible to make measurable progress" on national issues, "ask that candidate to run for president," he writes.

"Before I leave I’d like to see our politics begin to return to the purposes and practices that distinguish our history from the history of other nations. I would like to see us recover our sense that we are more alike than different," McCain wrote. "We are citizens of a republic made of shared ideals forged in a new world to replace the tribal enmities that tormented the old one. Even in times of political turmoil such as these, we share that awesome heritage and the responsibility to embrace it."

The memoir, co-authored by McCain's long-time collaborator Mark Salter, is set for release next month as McCain remains in Arizona while recovering from glioblastoma, an aggressive form of brain cancer. He has stayed in Arizona largely since the Congress ended its work in 2017.

McCain maintained in the book that he has no regrets in life as he continues to deal with stage 4 cancer, adding that it has been "quite a ride."

“'The world is a fine place and worth the fighting for and I hate very much to leave it,' spoke my hero, Robert Jordan, in For Whom the Bell Tolls. And I do, too," McCain said. "I hate to leave it. But I don’t have a complaint. Not one. It’s been quite a ride."

"I’ve known great passions, seen amazing wonders, fought in a war, and helped make a peace," he added. "I made a small place for myself in the story of America and the history of my times."