Short answer
Not in the Analects, the book that records his sayings. Asked about death, Confucius turned the question back to life: how can you know about death, he asked, while you do not know life? He revered Heaven (Tian, the high power honoured in the Chinese classics), and the Analects speaks of his own praying. He taught that wisdom is to respect spiritual beings but keep aloof from them. The Analects does not say what happens to a person after death. The Qur'an does. It says every soul tastes death and is brought back to God (﷾), and is paid in full on the Day of Judgment. Those saved from the Fire enter the Garden (Paradise). It also says how we can know this: God (﷾) speaks through messengers. It asks you to weigh the Qur'an with care.
Full explanation
Asked about death, he turned to life
Confucius (Kongzi, about 551-479 BCE) taught in short sayings, which his students gathered in the Analects (Lunyu). The English here is James Legge's of 1861. In one saying a disciple asks how to serve the spirits of the dead, and then asks about death. The Master turns each question back to this life. In another he says wisdom is to do one's duty to men and, while respecting spiritual beings, to keep aloof from them. A third lists spiritual beings among the subjects on which he did not talk.
“Chi Lu asked about serving the spirits of the dead. The Master said, 'While you are not able to serve men, how can you serve their spirits?' Chi Lu added, 'I venture to ask about death?' He was answered, 'While you do not know life, how can you know about death?'”
“Fan Ch'ih asked what constituted wisdom. The Master said, 'To give one's self earnestly to the duties due to men, and, while respecting spiritual beings, to keep aloof from them, may be called wisdom.'”
“The subjects on which the Master did not talk, were-- extraordinary things, feats of strength, disorder, and spiritual beings.”
He revered Heaven and spoke of his own praying
The Analects does not show a man without prayer. When he was very sick, a disciple asked leave to pray for him. He answered, "My praying has been for a long time." The oldest commentary, Zhu Xi (a later Confucian teacher) and Legge all read this as a gentle refusal. His whole life, they explain, was already in accord with the spirits, so he needed no special prayer. He did not mock prayer. He said that one who offends against Heaven (Tian) has none to whom he can pray. He said that Heaven produced the virtue that is in him. The Analects says of him that he sacrificed to the dead "as if they were present". This page takes these sayings at their word.
“The Master being very sick, Tsze-lu asked leave to pray for him. He said, 'May such a thing be done?' Tsze-lu replied, 'It may. In the Eulogies it is said, "Prayer has been made for thee to the spirits of the upper and lower worlds."' The Master said, 'My praying has been for a long time.'”
“The Master said, 'Not so. He who offends against Heaven has none to whom he can pray.'”
“The Master said, 'Heaven produced the virtue that is in me. Hwan T'ui-- what can he do to me?'”
“He sacrificed to the dead, as if they were present. He sacrificed to the spirits, as if the spirits were present.”
The Book of Rites does speak of the spirit
The Liji (Li Ki, the Book of Rites) is a collection of writings on ritual. Legge judged that it reached its present form in the Han period, though it may hold older passages. In it a disciple asks the Master about two words, gui (kwei) and shen (shan). They name the part of a person that returns to the earth, and the spirit. The Master explains that the animal soul is of the kwei nature and the intelligent spirit of the shan nature. He then says what becomes of each at death. Other chapters of the Liji say much the same: the body returns to the earth, and the spirit rises. The Master's answer here is not in the Analects, but we can take it as his. It says what happens to the body and the spirit. It does not say that the dead are raised or called to account, or by whom.
“All the living must die, and dying, return to the ground; this is what is called kwei. The bones and flesh moulder below, and, hidden away, become the earth of the fields. But the spirit issues forth, and is displayed on high in a condition of glorious brightness.”
Legge says the Li Ki may contain passages older than the two other ritual classics, which are books of the Zhou dynasty, but as a collection in its present form it does not go back before the Han dynasty and was not completed until the second century CE.
What the old Chinese history says does not perish
The Zuo zhuan is an old Chinese history, full of speeches. In it Fan Xuanzi asks what the saying "to die and yet not perish" means. The minister Mu Shu answers that the long line of a family is only hereditary rank and income. What does not perish, he says, is to establish virtue, to establish merit and to establish words. A family's unbroken sacrifices, he adds, are a great blessing found in every state, but cannot be called imperishable. So the answer is about what a person leaves behind: a name, deeds and words. It is not about what happens to the person.
Fan Xuanzi asks the minister Mu Shu (Shusun Bao) what the old saying "to die and yet not perish" means, and points to his own family's long line of ancestors. Mu Shu says that is hereditary emolument (income and rank passed down in a family), not what does not perish. He says that to establish virtue is the highest thing, then to establish merit, then to establish words: these last long and are not set aside, and this is what is called not perishing. He adds that a family keeping its name and its unbroken sacrifices is found in every state, and is the greatest of emoluments, yet cannot be called imperishable.
What the Qur'an says about death
The Qur'an says every soul tastes death, and that only on the Day of Judgment is each paid in full. It says that whoever is "saved far from the Fire and admitted to the Garden" has attained the object of life. It says we were not created in jest, and that we are brought back to God (﷾). God (﷾) created death and life to test which of us is best in deed. So death is not the end of the account.
“Every soul shall have a taste of death: And only on the Day of Judgment shall you be paid your full recompense. Only he who is saved far from the Fire and admitted to the Garden will have attained the object (of Life): For the life of this world is but goods and chattels of deception.”
“"Did ye then think that We had created you in jest, and that ye would not be brought back to Us (for account)?"”
“He Who created Death and Life, that He may try which of you is best in deed: and He is the Exalted in Might, Oft-Forgiving;-”
The person himself is raised, and a good name is kept too
The Qur'an records a man's question: "Who can give life to (dry) bones and decomposed ones (at that)?" It answers that the One who created them the first time will give them life. Islam does not despise a good name. Abraham asked God (﷾) for honourable mention on the tongue of truth among the latest generations. A good name is kept, and the person himself is raised.
“And he makes comparisons for Us, and forgets his own (origin and) Creation: He says, "Who can give life to (dry) bones and decomposed ones (at that)?" Say, "He will give them life Who created them for the first time! for He is Well-versed in every kind of creation!-”
“Grant me honourable mention on the tongue of truth among the latest (generations);”
How we can know: God (﷾) has spoken
Confucius taught that to admit what you do not know is part of knowledge. Islam agrees that no one learns the unseen by guessing. The Qur'an says God (﷾) alone knows the unseen, and makes it known only to a messenger He has chosen. It says God (﷾) speaks to people by inspiration, from behind a veil, or by sending a messenger. Islam keeps all prayer and worship for God (﷾) alone, for everyone: "invoke not any one along with Allah" (72:18). It asks you to consider the Qur'an with care. It says its Messenger, Muhammad (ﷺ), was sent to all people, and that he is the Seal of the Prophets, the last of them. Islam is a deen, a complete way of life: belief, worship, law, family and character together. God (﷾) says He has perfected it and chosen it for us (5:3). The Qur'an tells believers to enter it whole-heartedly. The page "What is Islam?" shows the whole in one place.
“The Master said, 'Yu, shall I teach you what knowledge is? When you know a thing, to hold that you know it; and when you do not know a thing, to allow that you do not know it;-- this is knowledge.'”
“"He (alone) knows the Unseen, nor does He make any one acquainted with His Mysteries,- "Except a messenger whom He has chosen: and then He makes a band of watchers march before him and behind him,”
“It is not fitting for a man that Allah should speak to him except by inspiration, or from behind a veil, or by the sending of a messenger to reveal, with Allah's permission, what Allah wills: for He is Most High, Most Wise.”
“"And the places of worship are for Allah (alone): So invoke not any one along with Allah;”
“Do they not consider the Qur'an (with care)? Had it been from other Than Allah, they would surely have found therein Much discrepancy.”
“Say: "O men! I am sent unto you all, as the Messenger of Allah, to Whom belongeth the dominion of the heavens and the earth: there is no god but He: it is He That giveth both life and death. So believe in Allah and His Messenger, the Unlettered Prophet, who believeth in Allah and His words: follow him that (so) ye may be guided."”
“Muhammad is not the father of any of your men, but (he is) the Messenger of Allah, and the Seal of the Prophets: and Allah has full knowledge of all things.”
“This day have I perfected your religion for you, completed My favour upon you, and have chosen for you Islam as your religion.”
“O ye who believe! Enter into Islam whole-heartedly; and follow not the footsteps of the evil one; for he is to you an avowed enemy.”
Four replies answered
Li Ki, Book XXI (Ki I), Section II, para 1 — SBE 28, p. 220
“All the living must die, and dying, return to the ground; this is what is called kwei. The bones and flesh moulder below, and, hidden away, become the earth of the fields. But the spirit issues forth, and is displayed on high in a condition of glorious brightness.”
Cited for
The Master did teach about the spirit after death: it "issues forth, and is displayed on high". Your page says he did not.
The response
The page says he did not in the Analects, and that is true. The Liji gives him these words, and we can take them as his. Even there the answer is about the body and the spirit parting. It does not say that the dead are raised or called to account, or by whom. The Qur'an does. Every soul tastes death (3:185), the One who made us first gives us life again (36:79), and we are brought back to Him (23:115).
Where it lands — The Liji describes the spirit rising. It does not say who raises the dead or who judges. The Qur'an says that God (﷾) does.
Analects 4.16 — Book 4, chapter 16
“The Master said, 'The mind of the superior man is conversant with righteousness; the mind of the mean man is conversant with gain.'”
Cited for
To do good for a reward after death is the way of the small man. Confucius said, 'The mind of the superior man is conversant with righteousness; the mind of the mean man is conversant with gain.'
The response
Islam agrees that good done for worldly gain or for show is spoiled. The Qur'an praises those who feed the poor. They say, "We feed you for the sake of Allah alone: no reward do we desire from you, nor thanks" (76:9). They seek nothing from people, only the pleasure of God (﷾). Islam does not hide that God (﷾) rewards the good. But hope in a just and generous God (﷾) is not the greed of the mean man. And the Day of Judgment is first of all justice. Many wrongs are never put right in this life, and many good people die unthanked. The Qur'an says even an atom's weight of good or evil will be seen (99:7-8).
Where it lands — Doing good for God (﷾), not for gain from people, is Islam's teaching too. Judgment is justice for every wrong, which this life does not give.
Analects 2.17 — Book 2, chapter 17
“The Master said, 'Yu, shall I teach you what knowledge is? When you know a thing, to hold that you know it; and when you do not know a thing, to allow that you do not know it;-- this is knowledge.'”
Cited for
To say "I do not know" is wisdom, as Confucius taught. To ask him for a teaching on death is to ask him to claim knowledge he did not have.
The response
Granted. He would not claim what he did not know, and Islam does not fault him for it. The question is where such knowledge could come from. No one learns the unseen by guessing. The Qur'an says God (﷾) alone knows it, and makes it known to a messenger He has chosen (72:26-27). So the question is whether He has spoken, and whether the book that says so holds up when it is weighed with care (4:82).
Where it lands — An honest "I do not know" is where the question begins. The Qur'an says it was answered by God (﷾) through a messenger, and invites you to test that claim.
Zuo zhuan, Duke Xiang, 24th year — Fan Xuanzi and Mu Shu on what does not perish
Fan Xuanzi asks the minister Mu Shu (Shusun Bao) what the old saying "to die and yet not perish" means, and points to his own family's long line of ancestors. Mu Shu says that is hereditary emolument (income and rank passed down in a family), not what does not perish. He says that to establish virtue is the highest thing, then to establish merit, then to establish words: these last long and are not set aside, and this is what is called not perishing. He adds that a family keeping its name and its unbroken sacrifices is found in every state, and is the greatest of emoluments, yet cannot be called imperishable.
Cited for
The Chinese answer is the three things that do not perish: virtue, merit and words. A person lives on in what he leaves behind.
The response
Islam keeps this too. Abraham asked God (﷾) for honourable mention among later generations (26:84). But the Zuo zhuan answers a different question: what lasts of a person's work. It does not say what becomes of the person. In the same passage Mu Shu honours a family's unbroken sacrifices, but says they are not what it means to be imperishable. The Qur'an says the person himself is raised by the One who made him first (36:79).
Where it lands — A name and its works can last. The Qur'an says the person is also raised.
Perspectives
Confucian: this life is the concern
Many Confucian teachers keep to the duties of this life. They hold that Confucius was wise to leave spirits and death aside, and that a good life needs no teaching about what follows.
Confucius wisely left spirits and death aside. He taught that to admit what you do not know is knowledge (Analects 11.11; 6.20; 2.17).
Rebuttal
Granted: honest ignorance is better than a guess, and Islam asks no one to pretend. But it leaves the question standing. The Qur'an says the unseen is known to God (﷾) alone, and that He tells a messenger He has chosen (72:26-27).
Confucianism is a teaching of ethics, not religion, and a good life needs no word about death.
Rebuttal
Granted that his teaching is full of duty. He also spoke of his own praying (7.34) and of offending against Heaven (3.13), so his own life was more than ethics. Duty still leaves one question: are wrongs that no one punished here ever put right? Some say history's praise and blame does that. But a verdict in books does not reach the dead wrongdoer, or repay the one he wronged. The Qur'an says each soul is paid in full (3:185).
Confucian: a person lives on in what he leaves and in memory
In one strand of Confucian thought a person lives on in virtue, deeds and words, and in descendants who remember and mourn. Nothing more needs to be said about death.
What does not perish is virtue, merit and words (Zuo zhuan, Duke Xiang, 24th year).
Rebuttal
Granted: a good name does live on, and Islam keeps it. Abraham asked God (﷾) for honourable mention among later generations (26:84). But the person is more than his name, and the Qur'an says the One who made him first will give him life (36:79).
Children remember their parents and mourn them for three years (Analects 17.21).
Rebuttal
Granted: this is real love, and the Qur'an commands kindness to parents (17:23-24). But memory is something the living give. It does not tell us what became of the one remembered. The Qur'an says every soul is brought back to God (23:115).
The Book of Rites: the spirit rises on high
The Liji gives the Master an answer about the spirit at death. Some readers hold that this shows Confucius did teach about what follows.
In the Liji the Master says that the bones and flesh return to the earth. The spirit "issues forth, and is displayed on high in a condition of glorious brightness".
Rebuttal
Granted: take these words as his. They describe the parting of body and spirit, and the spirit's brightness. They do not say whether anyone is raised or called to account, or by whom. The Qur'an says both (3:185; 36:79), and asks to be tested (4:82).
The Islamic perspective
In the Analects Confucius turns the question of death back to life, though he revered Heaven and spoke of his own praying. The Liji describes the parting of body and spirit, but not being raised or called to account. The Qur'an gives that answer. Every soul tastes death, is raised by the One who made it first, and is brought back to Him. Those saved from the Fire enter the Garden. It says God (﷾) has told us this through His messengers, and asks you to weigh the Qur'an with care. Islam is a whole way of life. It turns all worship to God (﷾) alone.
In the Analects, Confucius turns questions about death and the spirits back to this life. He teaches respect for spiritual beings while keeping aloof from them (11.11; 6.20; 7.20).
Confucius revered Heaven and spoke of his own praying (Analects 7.34; 3.13; 7.22).
The Qur'an says every soul tastes death and is paid in full on the Day of Judgment. Whoever is saved from the Fire and admitted to the Garden has attained the object of life. It says we were not created in jest, and that life and death are a test.
The Qur'an says the person himself is raised by the One who created him the first time. It keeps a good name too.
The Qur'an says the unseen is known to God (﷾) alone, and that He makes it known to a messenger He has chosen. God (﷾) speaks to people by inspiration, from behind a veil, or by sending a messenger.
The Qur'an asks to be considered with care. It says Muhammad (ﷺ), the Seal of the Prophets, was sent to all people.
Islam is a whole way of life, belief, worship and conduct together, which the Qur'an tells believers to enter whole-heartedly. It keeps all prayer and worship for God (﷾) alone (72:18).