Kaneko was born into a "samurai" family of Fukuoka Domain (Chikuzen Province's Sawara district, present-day Chūō-ku, Fukuoka), being the son of Kaneko Naomichi (1821-1876), leader of the Ansei Expedition to the Philippines in 1855. At the age of 9, he began his studies at the Shuyukan Han school. At 19, he was selected as a student member of the Iwakura Mission, and journeyed to the United States. He remained there while the rest of the mission continued on to Europe, with the instruction to obtain an education in any subject. At first, seeking a naval career, he planned to attend the United States Naval Academy in Maryland, but a doctor assessed his physical fortitude as insufficient and discouraged any military pursuit. Instead, Kaneko decided to seek a legal education, enrolling at Harvard University in 1876. He prepared for the challenging curriculum by seeking out the personal tutelage of future Supreme Court Justice Oliver Wendell Holmes Jr. At Harvard, Kaneko shared lodgings with fellow Japanese student and future fellow-diplomat Komura Jutarō. He also developed a wide circle of contacts in America, including lawyers, scientists, journalists, and industrialists.