No, the Sphinx did not commit suicide in the classic version of the myth. The story, as told by Sophocles in Oedipus Rex and other ancient sources, unfolds as follows:
The Sphinx, a monstrous creature with the body of a lion, wings of an eagle, and the face of a woman, plagued Thebes by posing a riddle to travelers: "What walks on four legs in the morning, two at noon, and three in the evening?" Those who failed were devoured. Oedipus answered correctly: Man (crawling as a baby, walking upright as an adult, using a cane in old age).
Upon being defeated, the Sphinx's curse was broken. In most classical versions (including Sophocles), she simply disappears or is destroyed by the gods as the natural consequence of her riddle being solved. Later traditions (e.g., some vase paintings and post-classical retellings) dramatize her death by having her throw herself from a cliff in rage or despair. But the canonical literary sources do not depict suicide; they depict defeat and the lifting of the plague.
The Sphinx represents an archaic, chthonic terror that reason (Oedipus's intellect) can overcome. Her end is not a choice but a necessary consequence of the triumph of logos over chaos.