The rally was Sanders' first event on the campaign trail since his heart attack on Oct. 1, when he had two stents inserted to open a blocked artery.
The heart attack threatened to derail the campaign of Sanders, 78, the oldest candidate in the crowded field seeking the Democratic nomination to face Trump in 2020. The U.S. senator canceled campaign appearances and returned to his home in Burlington, Vermont, to recover.
But Sanders was back to participate in Tuesday night's three-hour Democratic debate, and he has vowed to resume a full-tilt campaign pushing signature progressive issues such as a government-run healthcare program and a tax on the wealth of the richest Americans.
The backing of Ocasio-Cortez, who represents a New York district near where Sanders hel the rally, is expected to boost Sanders in his efforts to fight off fellow progressive White House candidate Elizabeth Warren, who has passed Sanders in opinion polls.
Sanders runs third behind Warren, a U.S. senator from Massachusetts, and former Vice President Joe Biden in most recent national polls, although Sanders raised more money for his campaign in the last quarter than any other Democrat.
U.S. Representative Ilhan Omar of Minnesota, another member of a group of progressive first-term congresswomen known as "The Squad," announced her endorsement of Sanders on Tuesday.
A third member of the group, Rep. Rashida Tlaib, is also expected to endorse Sanders, and his campaign said Sanders would tour her Detroit district with Tlaib on Oct. 27.