Extracted from the website of Buddhist Vajrayana Charity Funds Association and translated (釋迦牟尼佛最後的遺教) into English:
Buddha Sakyamuni’s Final Teaching
Before the Buddha entered into Nirvana, He gave His disciples this final dharma teaching:
“Disciples, you ought to treat yourself as the guiding light, treat yourself as the refuge depot, and do not rely on others; you ought to treat Dharma as the guiding light, as the refuge depot, and do not take refuge in other religions.
Observe the filth and dirt of one’s own body, then one will not greedy. One should recognise that both hardship and happiness are the cause of suffering, then will not overindulgent. One should observe one's heart to be selfless and free from confusion. In this way, with no greed, no overindulgence and no confusion, one can cut free from all suffering. After I leave this world, those who can practise this Dharma are my true disciples.
Disciples, you should often listen, often think, and often practise Dharma that I have once taught you in the past. Do not abandon it. If you can practise according to Dharma, you will surely have good fortune and happiness.
The most important lesson about the Dharma that I preach is to train the heart. Therefore, one should diligently suppress one's desires. One must maintain right body (action), right mind/thought and right speech; one must distance oneself from greed, anger, ignorance, and often remember impermanence.
When your heart is tempted by evil and is captured by desire, you must suppress these. Do not be led by the heart, you must act as the master of your heart.
The Heart can enable a person to become a Buddha, and it can also enable a person to become an animal. If one loses, one will become a ghost; if one awakens, one will become a Buddha, as both are the results of this heart. Therefore, you must maintain right mind/thought, commit to practise the right path, and never desert the Right Dharma.
Disciples, under the teaching of this Dharma, you must be friendly towards each other, respect each other, and do not quarrel. You should be as harmonious as water and milk, and should not be incompatible as water and fire.
Stick together and firmly adhere to my teachings. Study together, cultivate together, encourage each other, share the joy of Dharma, and do not be worried about or waste time on unnecessary matters. One should diligently reap the fruit of enlightenment.
Disciples, I have personally approved this Dharma teaching, and I have preached this Dharma for your benefit. You must firmly adhere to my Dharma teaching, and practice according to Dharma.
If you do not cultivate according to Dharma, whilst we may meet, it will be as if we have not seen each other, or we may be together, yet you are far away from me. Those who adhere to Dharma, even though they are far away from me, they are still with me.
Disciples, my life is nearly coming to the end, we are not far from the moment of parting. But, do not be upset, the world is impermanent, nobody can live forever without death, where there is life, there is death. At present, my body is like an old car prone to damage. This is how I use my body to manifest the principle of impermanence.
Do not be sad. You must understand this principle of impermanence, and be aware of the true reality of the human world. It is an unreasonable demand to stop changes to matters that are constantly changing.
The thief of worries often waits for an opportunity to knock you down. If there are venomous snakes lurking in your house, unless the venomous snakes are driven out, one will be unable to sleep peacefully.
One should pursue after the thief of worries, and one must expel the snake of worries. You should cautiously safeguard your own heart.
Disciples, my final moment has arrived. But you must not forget that this death is the death of my physical body. My body came from my parents; moreover, my life was maintained by the intake of food, and hence, sickness, injury and death are inevitable.
The nature of Buddha is not physical, it is the Bodhi instead. Although the body is destroyed, the Bodhi lives for eternity amongst the Dharma and its path. Therefore, those who witness my physical appearance does not mean they see me, those who know my Dharma teaching are the ones who see me.
After my death, my Dharma teaching is your teacher, continuously maintain my Dharma teaching is just like to serve me.
Disciples, for the 49 years in later half of my life, all the Dharma teachings, both internal and external that I should have taught, are now complete. All things, events and issues that I should do have also been handled. I do not have any secret.
Disciples, this is now my final moment. I am about to enter into Nirvana. These are my final teaching and precepts.”