Doraemon  (http://www.k.hosei.ac.jp/~h01d8188/wall0201s.gif) (ドラえもん) by Fujiko F. Fujio (藤子・F・不二雄) is a Japanese manga about a robotic cat from the future who has travelled back in time to aid the thoroughly hapless Nobita Nobi in order that his descendants reap the benefits of Nobita’s success one day rather than be burdened by the considerable financial debts which his incompetence has led them to suffer in the original timeline.
Doraemon’s ending…Spoiler Warning!
There are two current and often quoted urban legends that started spreading in late 1990s of an ending to the Doraemon series.
The first and the more optimistic ending was made public several years ago. Nobita was given a choice between replacing the battery inside a frozen Doraemon, which would cause it to lose all memory, or await a competent robotics technician who would be able to resurrect the cat-robot one day. Nobita swore that very day to work hard in school, graduate with honours, and become that robotics technician. He successfully resurrected Doraemon in the future as a robotics professor, became successful as an AI developer, and thus lived happily ever after, thus relieving his progeny of the financial burdens that caused Doraemon to be sent to his space-time in the first place.
The second, more pessimistic ending suggests that Nobita Nobi is suffering from autism and that all the characters (including Doraemon) are simply fictional characters in his imagination. The idea that Nobita was a sick and dying little boy who imagined the entire series on his sickbed to help him ease his pain and depression no doubt angered quite a bit of fans. (WORST ENDING EVER!!!)
However, the plausibility of the issues was discussed here and it concludes that there is no ending to Doraemon. See  (http://www.remus.dti.ne.jp/~chankuma/DoraData/Q&A/Q&A1.html#QA005) (Japanese).
However, there are actually three official endings to Doraemon that were made. Doraemon was discontinued in two media because readers were advancing in grades and an ending was believed to be needed. These two are not reprinted.
1) In March 1971 issue of the magazine Shogaku 4-nensei  (http://www.netkun.com/sho4/) (lit., elementary school’s fourth grader; 小学四年生) Doraemon claimed that visitors from futures were causing too much trouble and that a trip to the past was being discontinued. Doraemon leaves Nobita.
2) In March 1972 issue of the magazine Shogaku 4-nensei Doraemon for some reason had to go back but fakes a mechanical problem so that Nobita would let him go. Nobita believs and promised to wait until Doraemon get well. Realizing that Nobita can handle departure, Doraemon tells the truth and Nobita accept. Doraemon returns to the future.
3) The third ending was actually meant to be the official ending as the TV rating did not fare well and the Fujiko Fujio duo was busy with other works. But Doraemon did not leave their minds and restarted from next month’s issue. In 1981, this episode was made into anime and in 1998, this was released as an anime movie.
In March 1973 issue of the magazine Shogaku 4-nensei, Nobita again returns home after losing a fight against Gian. Doraemon then explains that he had to return. Nobita tries to have Doraemon stay but after talking over with his parents accept Doraemon’s departure. They take a last walk in the park. After they split up, Nobita encounters Gian and gets into a fight again. After a long duel with Nobita trying to win at all cost so that Doraemon can leave without worries, Gian lets Nobita win for not giving up. Doraemon find passed out Nobita and takes him home. Sitting beside sleeping Nobita and after a moment of thought, Doraemon returns to the future.
When the Fujiko Fujio duo broke up in the 1987, the very idea of an official ending to the series was never discussed. Since Fujiko F. died in 1996 before any decisions were reached, any “endings” of Doraemon are fan fiction.