Mohamed Salah scored his first goals at Old Trafford with a brace but Liverpool’s winless run goes on.
United will host West Ham United in the next round in February.
Greenwood had two chances early on but Alisson saved his first one and the second went past the post.
United equalised eight minutes later with a quick counter attack which saw Rashford clip a brilliant pass to Greenwood who finished into the bottom corner.
The hosts scored again three minutes after half-time when Greenwood set up Rashford to finish.
Liverpool responded well and Salah grabbed his second on 58 minutes after James Milner missed a sitter moments before.
Salah was close to hitting his hat trick on the break but his shot went straight at Henderson.
Fernandes came on as a substitute late on and scored the winner from a free kick with 12 minutes remaining.
Edinson Cavani almost made it four in the 90th minute but his header clipped the post but United held on to win.