Several reasons compel Odysseus to participate in the war against Troy. Perhaps the most important is his history with Helen.
Although most of what we know about Odysseus comes from Homer's Iliad and Odyssey, post-Homeric stories about Odysseus shed some light on his participation in the war. For example, we are told that Odysseus was originally a suitor for Helen, the daughter of King Tyndareos, but Odysseus then fell in love with Penelope, Tyndareos's niece. Helen had so many powerful suitors that Tyndareos became concerned that, because only one could be successful, the other suitors would essentially go to war with each other. Odysseus, known for his wise counsel, suggested to Tyndareos that he require all suitors to swear an oath to support the winning suitor for Helen, which turned out to be Menelaus of Sparta. As a reward for Odysseus's counsel, Tyndareos arranged the marriage between Odysseus and Penelope.
When emissaries from Agamemnon and Menelaus came to Ithaca to ask Odysseus to join in the Greek effort to rescue Helen from the Trojans, Odysseus, now a family man with an infant son, Telemachus, is reluctant to go. According another post-Homeric story, Odysseus had been warned that if he were to join the Greeks, he would be gone for twenty years, and so Odysseus trys to avoid his obligation (as one of Helen's former suitors) by pretending to be mad—for example, he sows salt into his fields instead of seed. The Greek emissaries—Nestor, Palamedes, and Menelaus—call his bluff by placing Telemachus in the path of Odysseus' plow. He stops his plow before doing any harm to his infant son, and with this act of sanity, gives up any pretensions to madness and agrees to join the Greek forces.
As one of Helen's former suitors—and having sworn an oath to support Helen and Menelaus—Odysseus could not, in this warrior society, break an oath unless something extraordinary occurs. Odysseus, known as a wise counselor and as a trickster, feigns madness, which is probably one of the only conditions that would have allowed him to violate his oath. He is, however, out-foxed by the Greek emissaries from Agamemnon, leaving him with no credible excuse for staying safely in Ithaca.