the oldest attestation in the OED is from 1900 and consists of a native American saying 'Good mornin. Long time no see you'. From reading around this topic for a while it looks like there is no solid evidence that the phrase moved into English from any one language but I would cite the OED attestation if I knew how to!
Here it is:
7.c. Colloq. phr. (orig. U.S.) long time no see, a joc. imitation of broken English, used as a greeting after prolonged separation. 1900 W. F. Drannan 31 Yrs. on Plains (1901) xxxvii. 515 When we rode up to him [sc. an American Indian] he said: ‘Good mornin. Long time no see you.’ 1939 R. Chandler in Sat. Even. Post 14 Oct. 72/4 Hi, Tony. Long time no see. 1940 [see hiya int.]. 1959 D. Beaty Cone of Silence viii. 105 ‘Hello, Clive.’ ‘Long time no see.’ 1959 C. MacInnes Absolute Beginners 68 Hail, squire.‥ Long time no see. 1971 D. E. Westlake I gave at the Office (1972) 164 ‘Hello, Arnold,’ I said.‥ ‘Long time no see.’
Hmm. I had thought that {{unk.}} was an etymology-language template, indicating that a word came from an unknown language; but I gather from your comment, and from some of the pages that currently use it, that it really just means that the etymology is unknown? —RuakhTALK02:07, 6 October 2010 (UTC)[reply]
That seems to be how it is used, not just by me. It autocategorizes into "Unknown etymology" with a lang=, at least now. There is also {{und}}, for "undetermined language". DCDuringTALK05:18, 6 October 2010 (UTC)[reply]
Thanks for the comments! I’ve incorporated them and rewritten the etyl to clarify that it is unknown and reference OED, as of this edit. As noted, there is no solid evidence either way – there is an identical phrase in Chinese and other terms (of same period?) did move from Chinese to English, but OTOH it’s first attested as (presumably invented) pidgin English, and such language was popular at the time (e.g., Tonto). It also seems sometimes attributed to Chinese/Chinese-American prostitutes or bar maids, as a pickup line, but this may be a latter day change.