The League of Nations was established by part I of the Treaty of Versailles. It was similar in purpose and structure to the United Nations today. However, it was not successful at preventing another war, and it ceased to function during World War II. After WWII it was replaced by the United Nations.
Part of the reason for its failure was undoubtedly that the United States never joined it, since the US Senate refused to ratify the Versailles treaty.