The American Dream in the post-World War II era, the setting of Miller's play, was essentially the same as it is today: to build a successful life. Financial success and home ownership were certainly a part of it, as were raising a family and living to see one's children graduate from college and succeed on their own. Willy Loman reached for the American Dream, but it eluded him for various reasons.
Despite his years of hard work, Willy's career as a salesman falls apart; at the end of his life, he is unemployed and almost penniless, living on loans from his friend to support his wife Linda. Ironically, as he moves toward old age, the time when he should be enjoying the fruits of his labor, Willy is worth more to his family dead than alive, in financial terms. After he commits suicide, it is the proceeds from his life insurance that pay off the loan on the family's house.
An even more painful failure for Willy is the way his sons turn out. Both Biff and Happy grow up to be irresponsible adults, never succeeding in life in any way, personally or professionally. Willy's dreams of college for his sons end when Biff fails to graduate from high school and Happy does not apply himself in any productive activity.
Willy Loman's American Dream does indeed turn into a nightmare for him, and he himself is responsible for much of it. Part of Willy's tragedy is that he never recognizes how or why his dreams fall apart.