The emergence of Rashford under former manager Louis van Gaal was one of few positives for United in a disappointing campaign.
The 18-year-old United academy graduate scored eight goals in 18 appearances this season, including two on his debut against Midtjylland in the Europa League.
He followed up with two goals against Arsenal and scored the winner in the Manchester derby against City in March.
"I am delighted to have signed a new contract. I have always been a Manchester United fan, so to be playing in the first team really is a dream come true," Rashford said.
"I am grateful for having the chance to prove myself. To be able to play football at the biggest club in the world means everything to me and my family."
The emergence of Rashford under former manager Louis van Gaal was one of few positives for United in a disappointing campaign in which they finished fifth in the Premier League.
"Marcus is a naturally talented footballer with great potential. He has taken his chances well and has integrated into the first team very quickly," United's Executive vice chairman Ed Woodward told the club's website.
"I am delighted that Marcus has signed a new contract, he is at the right club to continue his development."
Rashford's performances caught the eye of England manager Roy Hodgson, who named the youngster as a surprise pick in his 26-man provisional squad for the European Championship.
Rashford became the youngest player to score on his England debut, when he netted 138 seconds into his first senior start in the 2-1 win over Australia on Friday.
Left back Cameron Borthwick-Jackson also signed a new contract, keeping him at the club until 2020, with an option of extending for a further year.
"I have grown up at United and have enjoyed every minute of being here. Last season was an incredible experience to make my first team debut and a dream come true for myself and my family," the 19-year-old said.
"I will continue to work hard and take advice from the manager and his coaching team to improve with every training session."