He began his career in the Shogunate at age 20, entering into Dutch studies (rangaku), and was posted as an instructor at the Nagasaki Naval Training Center.
However, he was reassigned to the Shogunate's Kōbusho military academy in 1864, and it was there that he worked with Ōtori Keisuke, learning French-style infantry tactics in Yokohama in 1865.
In 1868 during the Boshin War of the Meiji Restoration, Arai was assigned as a captain to the Shogunal Navy, and together with Enomoto Takeaki departed Shinagawa Harbor when Edo was surrendered to the Imperial Army.
He was later put in charge of the Central Meteorological Agency during the Meiji period, became the first person to photograph the corona of the sun in Japan, during a solar eclipse in 1887, introduced the meter system, founded Hokkaido University, and established standard time.
Later in life, together with his old colleague Ōtori Keisuke, he contributed to the magazine Kyū Bakufu, writing articles about his experiences in the 1860s, as well as about the navy of the former Shogunate.