The oldest son of a controlling and sometimes vicious father, Andrei is an intellectual and high-achieving young man who tries to find meaning through glory, family, and romantic love, only to have his life cut tragically short.
Andrei is clearly meant to be a stark contrast, or foil, to Pierre. This kind of comparison is a pretty standard trope (literary device) because it's a handy way of comparing different ideas, different personality types, or different kinds of upbringing. (Just think about how many stories start with two girls, one blond, one brunette, for example.)
Pierre is all body – we are constantly told about his weight, his sexual desires, and even how and what he eats. Andrei tries as hard as possible to get away from all that fleshy business. He's almost like a ghost just floating through the book.
In the beginning, even though he is married (to a pregnant wife), Andrei tells Pierre both to avoid marriage and to stop his debaucherous ways – basically condemning any type of sex at all. Later Andrei falls in love with Natasha but figures nonphysical love should be enough while he takes off for a year. He assumes she'll just happily wait around for him while he's away and not care about the physical deprivation.
When he joins the army, Andrei totally intellectualizes the experience. Sometimes he's longing for some abstract concept of battle glory (which is completely destroyed for him once he actually sees what being in battle is really like). Other times he's writing a long thesis about how to restructure the army (which might be a good mental exercise, but it's clearly an entirely unrealistic approach to the realities of battle). Finally, after his injury, Andrei disappears more and more into his hallucinatory visions and seems really happy to leave life behind. Tolstoy describes him checking out of life before his body actually shuts down.Timeline