Emperor Meiji abolished the samurai's right to be the only armed force in favor of a more modern, western-style, conscripted army in 1873. Samurai became Shizoku (士族) who retained some of their salaries, but the right to wear a katana in public was eventually abolished along with the right to execute commoners who paid them disrespect.
The samurai finally came to an end after hundreds of years of enjoyment of their status, their powers, and their ability to shape the government of Japan. However, the rule of the state by the military class was not yet over.
In defining how a modern Japan should be, members of the Meiji government decided to follow the footsteps of United Kingdom and Germany, basing the country on the
concept of "noblesse oblige." Samurai were not to be a political force under the new order.
With the Meiji reforms in the late 19th century, the samurai class was abolished, and a western-style national army was established. The Imperial Japanese Armies were conscripted, but many samurai volunteered to be soldiers and many advanced to be trained as officers. Much of the Imperial Army officer class was of samurai origin and they were highly motivated, disciplined and exceptionally trained.
The last samurai conflict was arguably in 1877, during the Satsuma Rebellion in the Battle of Shiroyama. This conflict had its genesis in the previous uprising to defeat the Tokugawa Shogunate, leading to the Meiji Restoration.
The newly formed government instituted radical changes, aimed at reducing the power of the feudal domains, including Satsuma, and the dissolution of samurai status. This led to the ultimately premature uprising, led by Saigō Takamori.
Samurai were many of the early exchange students, not directly because they were samurai, but because many samurai were literate and well-educated scholars. Some of these exchange students started private schools for higher educations, while many samurai took pens instead of guns and became reporters and writers, setting up newspaper companies, and others entered governmental service.
Only the name Shizoku existed after that. After Japan lost the World War II, the name Shizoku disappeared under the law on January 1, 1948.