The submarine was ordered on 18 December 1911. On 15 June 1912 the O 4 was laid down in Flushing at the shipyard of De Schelde. The launch took place on 5 August 1913.[1]
A passive sonar and two retractable periscopes were installed on the ship making it the first submarine in the Dutch navy having this equipment.[1]
On 17 June 1914 the ship was commissioned in the navy. During World War I the ship was based in Flushing. Queen Wilhelmina visited the ship on 22 December 1914.[1]
In 1935 the O 4 was decommissioned.[1]