President Joe Biden's son Hunter says his service on the board of a Ukrainian gas company, which Republicans tried to turn into a negative during the 2020 presidential campaign, wasn't unethical and didn't represent a lack of judgment on his part.

But the younger Biden wouldn't do it again if given a chance, he says in a new book, citing partisan politics.

“I did nothing unethical, and have never been charged with wrongdoing," Hunter Biden writes in “Beautiful Things,” a memoir. “In our current political environment, I don't believe it would make any difference if I took that seat or not. I'd be attacked anyway."

FILE - In this Wednesday, Jan. 20, 2021, file photo, President Joe Biden hugs first lady Jill Biden, as his son Hunter Biden and daughter Ashley Biden look on after the president was sworn-in during the 59th presidential inauguration at the U.S. Capitol in Washington. Vice President Kamala Harris applauds, at left. Hunter Biden says his service on the board of a Ukrainian gas company wasn't unethical and didn't amount to a lack of judgment on his part. But he writes in a new book, “Beautiful Things,” that he wouldn't do it again, citing partisan politics as the reason. (AP PhotoCarolyn Kaster, File)

FILE - In this Wednesday, Jan. 20, 2021, file photo, President Joe Biden hugs first lady Jill Biden, as his son Hunter Biden and daughter Ashley Biden look on after the president was sworn-in during the 59th presidential inauguration at the U.S. Capitol in Washington. Vice President Kamala Harris applauds, at left. Hunter Biden says his service on the board of a Ukrainian gas company wasn't unethical and didn't amount to a lack of judgment on his part. But he writes in a new book, “Beautiful Things,” that he wouldn't do it again, citing partisan politics as the reason. (AP PhotoCarolyn Kaster, File)

“What I do believe, in this current climate, is that it wouldn't matter what I did or didn't do,” he wrote. “The attacks weren't intended for me. They were meant to wound my dad.”

In the memoir, which is scheduled to be released on Tuesday, the president's son chronicles a lifelong battle with alcohol and drug addiction and numerous stints in and out of rehab.

Hunter Biden writes that his descent into darkness followed the death of his older brother, Beau, of brain cancer in 2015 at age 46. He ends the book where he currently is in life: sober, living in California with his second wife, Melissa Cohen Biden, and their baby son, Beau. Hunter Biden also has three daughters from his previous marriage.

During the 2020 campaign against Democrat Joe Biden, President Donald Trump, a Republican, and his allies repeatedly sought to make an issue of the younger Biden's work for the Ukrainian gas company Burisma. Trump alleged unspecified shady dealings by the Bidens despite the lack of evidence of any wrongdoing by either candidate Biden or his son.

Trump ultimately was impeached by the Democratic-controlled U.S. House for pushing Kyiv to investigate the Biden family. The Republican-controlled Senate voted to keep Trump in office.

Hunter Biden writes that his only misjudgment was not considering, back in 2014 when he joined Burisma's board to help oversee its corporate practices, that Trump would be in the White House three years into the future.

A lawyer and former lobbyist, he joined Burisma's board around the time his father was vice president and helping conduct the Obama administration's foreign policy in eastern Europe.

Trump and others had insisted without evidence that Hunter Biden was exploiting his father’s name, and they raised unsubstantiated charges of corruption.

“Knowing all of that now: No, I would not do it again,” Hunter Biden wrote. “I wouldn't take the seat on Burisma's board. Trump would have to look elsewhere to find a suitable distraction for his impeachable behavior.”

The book's title, “Beautiful Things,” is an expression Hunter Biden and his brother would use with each other after Beau's diagnosis and was meant to stress what was important in life.

The memoir was in the works before Joe Biden became the front-runner in the Democratic presidential campaign. It was kept under wraps even as Hunter Biden’s business dealings became a fixation of Trump and his allies during the election, and his finances the subject of a Justice Department investigation.