The period came to an end with the Meiji Restoration on May 3 , 1868 , after the fall of Edo .
The period ended with the Meiji Restoration , which was the restoration of imperial rule .