Volume IV part I chapter 16.
Tolstoy's main concern, as can be seen in his works, is the meaning of life, and therefore, he many times writes about death, the process of dying, the struggle, the waiting... If I'm not mistaken, up to this point in War and Peace there have been 3 deaths that are described in detail (2 other important deaths are Liza's and Helene's, but Liza dies in childbirth and Helene's death is only mentioned).
The 1st one is count Kirill Bezukhov's. The dying man isn't the focus; instead, Tolstoy draws our attention to the preparations, to all the people coming into and out of the room and waiting for his death without any sadness, to all the relatives discussing his will and the heir Pierre and their own future, to the hypocrites wearing appropriate facial expressions and feigning sorrows; and at the same time, Tolstoy describes Pierre, the only person amidst all this mess who doesn't care about the fortune and who remains passive the whole time and outside of it all.
The 2nd one is the old prince Bolkonsky's. Tolstoy doesn't slip into the old man's mind- rather, he writes down what goes on in Marya's mind, but one can see that the approaching death brings both some kind of epiphany as they come to understand themselves and their love for each other, and at the same time, resolves the conflict that has existed for a long time between them.
The 3rd, and most interesting, death is Andrey's. Tolstoy doesn't forget the feelings and actions of Natasha and Marya, but this time puts more focus on the dying man's thoughts and emotions. One should also note that twice before Andrey has faced death. For some reasons he's associated with no.3: 3 times he is disillusioned, 3 times he runs away from reality, 3 times he faces death, 3 times he experiences awakening. Each time, there is an image: the vast sky, the sight of Anatole and finally, Natasha; yet the 3rd time involves a struggle between life and death, between acceptance of death and yearning for life, because he loves Natasha, more than anything in the world. Unlike Bezukhov, Andrey isn't surrounded by a bunch of people who wait him to die soon. Unlike his father, and I should add, Ivan Ilyich, he doesn't die with regret.
At last, he dies in peace.