Why did John Adams negotiate a diplomatic end to the Quasi-war with France which he knew would alienate him from his own political party?
The reason that John Adams did not go to war with France was because he felt that it would be disastrous for the United States. He elected to do what was best for the country rather than doing what was best for him or his political party.
The Federalists really wanted war with France. They were very much opposed to the ideas of the French Revolution. It would have made political sense for Adams to give in to them, particularly after the XYZ Affair. However, Adams believed that the US was not strong enough to engage in a full-blown war with a major power. Therefore, he made the best peace he could.