I understand Morocco is the first nation to recognize America as it's own sovereign country, but what was the last nation? I understand it's possible that there are nations that still do not recognize the United States (I'm not sure if there are) but what was the last one to do so?
Perhaps a better question might be: Of nations contemporary to the American Revolution, which was the last to recognize the US?
That would avoid the simple answer of whichever splinter state most recently appeared (South Sudan, etc.).
Also, why was Morocco the first to recognise the United States?
Not surprisingly, most of the most recent nations to start formal relations with the US are nations that came into existence only recently. There are some others (like Monaco) that have had dealings with the US for a long time but have historically been too small to bother sending an actual ambassador. Cuba very recently reestablished relations with the US, but had had them before its revolution. And there are in fact some countries that currently do not recognize and have never recognized the US: the most obvious is North Korea.
Ignoring these cases (which I don't think meet your criteria) the best example is probably either Mongolia (with whom relations were established in 1988) or Vietnam (1995). Vietnam is more recent, but if you consider it a partial successor to South Vietnam then obviously that country recognized the US.
Wasn't it the State of Dubrovnik that first recognized the US?
Did England hold off recognising the US the most recent nations to start formal relations, is it?