The origin of sushi is very uncertain.
The most common opinion is that it was brought by Buddhist monks who returned from China in the 7th century. Very similar to sushi was a preparation that appeared in Japan already with the introduction of rice cultivation, around the 4th century BC, a variant of an ancient method to conserve the fish widespread in south-eastern Asia and in China: the raw fish was placed in layers with salt alternating with rice and kept pressed for a few weeks; later it was left to ferment for months.
This type of sushi is called narezushi, still very much appreciated in the Tokyo area. In the 17th century it began to add rice vinegar to shorten rice fermentation times and the fish was marinated or cooked. It was only around 1820 that appeared in Edo (the present-day Tokyo) the recipe closest to modern sushi.