Alexander Hamilton and James Madison were the main authors of the "Federalist Papers," which actually essays that were published in various newspapers. John Jay was also involved in the writing.
Three men authored The Federalist Papers not two. They were Alexander Hamilton, James Madison and John Jay. Hamilton by far wrote the most followed by Madison. Jay contributed the least.