At the time, the Ultimate version of Peter Parker sacrificed his life to save Aunt May, and Miles stepped up to replace him as New York’s Friendly Neighborhood Spider-Man – having also been bitten by a radioactive spider.
Since then, Earth-616 and the Ultimate Universe have collided and united, meaning that Peter and Miles co-exist.
Miles Morales was first introduced into Marvel Comics in 2011 – though he was part of what was called the Ultimate Universe at the time – a universe separate from the “normal” one where most heroes came from (also known as Earth-616).