In an address before the United Nations on September 20, 1963, President Kennedy talked about the many ways in which relationships had warmed between the Soviet Union and the United States in the past two years. He praised very recent developments such as the Partial Nuclear Test Ban Treaty and the beginnings of what would become the Outer Space Treaty. He finished with a proposal for even more cooperation:
Finally, in a field where the United States and the Soviet Union have a special capacity--in the field of space--there is room for new cooperation, for further joint efforts in the regulation and exploration of space. I include among these possibilities a joint expedition to the moon. Space offers no problems of sovereignty; by resolution of this Assembly, the members of the United Nations have foresworn any claim to territorial rights in outer space or on celestial bodies, and declared that international law and the United Nations Charter will apply. Why, therefore, should man's first flight to the moon be a matter of national competition? Why should the United States and the Soviet Union, in preparing for such expeditions, become involved in immense duplications of research, construction, and expenditure? Surely we should explore whether the scientists and astronauts of our two countries--indeed of all the world--cannot work together in the conquest of space, sending someday in this decade to the moon not the representatives of a single nation, but the representatives of all of our countries.
The full text of the address can be found online at the John F. Kennedy Presidential Library and Museum. The Soviet Union seriously considered the proposal. Unfortunately, President Kennedy was assassinated two months later, and nothing became of the proposal.