William Cohen would become captain of the basketball team at Bowdoin College and saw himself solidly, and proudly, as a “jock.”

So when English professor LeRoy Greason assigned him the task of writing a sonnet, Cohen wanted no part of it. He tried explaining he didn’t have time to write a 14-line poem, because he was traveling with the team. Greason told Cohen he would surely get an F if he didn’t at least attempt to unleash his inner poet.

“I was a big man on a tiny little campus, and I essentially said, ‘Hey, real men don’t write poetry,’ ” said Cohen, 74. “Once I wrote it, it revealed to me that one assignment, one teacher, can alter the way you see yourself.”

Cohen eventually wrote a sonnet called “Can Season be the Reason,” which he can still recite more than 50 years later. He went on to major in Latin poetry and has been passionate about writing ever since. He has written 13 books ranging in genre from poetry to nonfiction and suspense-filled mysteries. His latest novel, “Collision,” is a thriller about the possibility of asteroid mining for profit. It hit stores June 2.

As dedicated as he is to writing, Cohen is better known for his career in politics than for his 2006 novel “Dragon Fire,” a New York Times best seller, or his 1986 poetry collection, “A Baker’s Nickel.” The Bangor native was Maine’s representative in Congress from the 2nd District from 1973 to 1979, was a U.S. senator from Maine from 1979 to 1997, and then served as U.S. secretary of defense under President Bill Clinton from 1997 to 2001.

Several of Cohen’s novels, including “Collision,” benefit from an insider’s knowledge of the workings of Washington, the military, government agencies, and global politics. “Collision” is about efforts to manipulate the course of asteroids for the purposes of mining for profit. The plot involves various national governments, scientists, crooks, a murder, and a lot of science.

As background for the book, Cohen read an Air Force report and talked to staffers at NASA. Plus, he was secretary of defense and knows a little about how the government might react in times of crisis, like when unsavory characters try to manipulate the paths of asteroids.

Knowing your subject, however, is a far cry from writing a riveting story with intriguing twists or plausible characters. Cohen accomplished this in “Collision,” in the opinion of another Maine writer of thrillers and mysteries, Douglas Preston.

“He’s got a great writing talent. His language is direct, exciting, and interesting. It’s the opposite of dry-as-dust science writing,” said Preston, who has a home in the Round Pond area of Bristol. “He absolutely knows what he’s talking about, and he brings you into a world that is authentic and absorbing.”

Preston read Cohen’s novel in advance, to write a promotional blurb for it. But he says he doesn’t really know Cohen, though he met him once, when both were giving away books to wounded soldiers.

“Collision” begins with a prologue that includes two real quotes about the potential danger of an asteroid colliding with Earth. One is from George E. Brown Jr., a California Democrat who served in the U.S. House with Cohen. The other is from NASA administrator Charles Bolden, a former astronaut, talking about how the government would not be prepared in the event of a possible asteroid collision or even a near miss.

But the novel itself is a thriller, about the complex web of intrigue surrounding attempts to manipulate the orbit of an asteroid and then mine it for profit. The opening chapter introduces readers to Cole Perenchio, an engineer concealing a laptop computer in a gym bag, who hires a taxi to take him to a desolate spot near Washington, D.C., called Roaches Run. There he meets with a lawyer in a limousine, and tells him in cryptic fashion about a plot that could “kill us all.”

Cohen said he got the idea for the plot after reading about companies interested in trying to mine asteroids. So part of the story is the creation of a “what if” scenario in which companies might figure out how to change the orbit of asteroids, for mining, but in an unregulated, gold-rush atmosphere.

“That’s part of it, making people understand we should all be concerned about our limited ability to see and track asteroids. One that’s 450 feet long, traveling at probably 35,000 miles per hour, would destroy a city,” said Cohen, from his office in Washington. “In Russia (in 2013) one that was just 56 feet in diameter exploded in space and just the debris left 1,490 people injured.”

But Cohen didn’t want to simply write a nonfiction warning; he wanted to weave the potential danger into an entertaining story.

Cohen said ever since he wrote that sonnet at Bowdoin, he has tried to use his writing skill and imagination in whatever he writes. After graduating from Bowdoin in 1962, he went to Boston University law school and then practiced law. But even his law briefs, he says, were written with “literary flair.”

While in Congress he published his first couple of poetry books. Some on the staff of his publisher tried to convince him to write a novel. But the right idea hadn’t come to him yet.

An idea came to him at 3:30 a.m., during a 1980 filibuster Cohen thinks might have been about a gasoline tax. Cohen found himself alone on the Senate floor with Gary Hart, a Democrat from Colorado. The two went to the Senate dining room to get some coffee, when Cohen asked Hart what he’d rather be doing. Hart’s answer was “writing a novel in Ireland.”

The two began brainstorming novel ideas on the back of a large envelope, using topics they knew about from their work on various Senate committees. The list of plot elements included terrorism, drug money, an assassination, the CIA, the KGB and a crusading senator.

Cohen showed the outline they had written to an agent, and sold the idea for what would become the novel “The Double Man.”

Cohen continued to write, using subjects he was familiar with from his time in government. “Blink of An Eye” (2011) was about a nuclear bomb destroying a major U.S. city, the radiation poisoning that followed, and an investigation into what intelligence knew or didn’t know about the bomb. “Dragon Fire” was about a secretary of defense battling enemies all around.

Though he uses his experience dealing with military commanders, presidents and world leaders in his writing, he’s not worried about giving away state secrets. He’s careful, he says, to only mention weapons or programs that are already publicly known.

He does, however, remember one time when he wanted to create some code names for covert missions in his novel “One Eyed Kings” (1991) and he decided to check the names with various intelligence-gathering groups.

“They told me there were a few I shouldn’t use, so I took them out,” said Cohen.

Cohen lives in Washington, D.C., where he runs The Cohen Group, a global business consulting firm with offices in Washington, China and India. Besides Cohen, members of the group include former military commanders, government veterans and ambassadors. Cohen says his firm works with American companies doing business around the world, helping them solve problems, whether they be legal, regulatory, marketing or political.

Cohen does come back to Maine to visit family, including a son and a sister. Besides running The Cohen Group, he continues writing, including work on a sequel to “Collision” that is “almost done.”

“I’m just an amateur, I know that,” said Cohen. “But I love writing.”