The Knox-Porter Resolution was the law that officially ended the involvement of the United States in World War I. The US did not end up ratifying the Treaty of Versailles, which other countries signed to end the war. Therefore, another law was needed to officially end US involvement. The Knox-Porter Resolution was this law.
When Woodrow Wilson was still president, he was determined to have the Senate ratify the Treaty of Versailles as it had been written. The Senate, however, did not want to. It felt that US involvement in the League of Nations would be bad for the country unless the treaty were changed in some way to protect American interests. Wilson was not interested in such a compromise.
In 1921, Warren Harding became president. He indicated that he, too, opposed participation in the League of Nations. Therefore, he was not going to push for ratification of the Treaty of Versailles. If the US was not going to ratify this treaty, it needed to separately end its war against the Central Powers. It did so thorough the Knox-Porter Resolution which was signed into law by President Harding in July of 1921.