In 1823 Nils Ericson joined the Engineering corps of the Swedish Army as a second lieutenant, but in 1830 he transferred to the Navy Mechanical Corps (where he eventually advanced to the rank of colonel in 1850).
In 1833 he married a daughter of Count von Schwerin in Östergötland.

Between 1830 and 1850 Nils Ericson planned and directed the construction of the canals at Stallbacka, Säffle, Karlstad and Albrektsund.
He also led the construction of the Saimaa Canal in Finland (constructed 1845-52), the reconstruction of the Trollhätte Canal in Trollhättan Municipality and the floodgate at Stockholm.
In 1845, he was elected a member of the Royal Swedish Academy of Sciences.

After 1850 he was primarily occupied with the design and construction of the Swedish state-owned railway system.
At the same time he led the planning of the Dalsland Canal while construction there was being led by his son Werner.

Sweden started building railways later than many other European countries, having hesitated under heavy debate for several years because of the costs and other issues.
Following the Riksdag's decision in 1854, Erikson was chosen to lead the project of building the main lines (stambanorna).
There was also a decision that, for military reasons, the railways should avoid the coasts as much as possible.

His proposal was that the line between Gothenburg and Stockholm (Western Main Line, Västra stambanan) should run south of Lake Mälaren to avoid competition with shipping.
He also proposed that the line between Malmö and Stockholm (Southern Main Line, Södra stambanan) should go north via Nässjö to meet up with Western Main Line at Falköping until the Western's eastward construction reached Katrineholm, where a better junction could be built with a southern line heading directly to Nässjö.
 This line was called Eastern Main Line (Östra stambanan) but has in modern times been defined to be part of the Southern Main Line.
 Ericson's proposal also included the railway between Stockholm and Ånge (Northern Main Line, Norra stambanan) and Main Line Through Upper Norrland (Stambanan genom övre Norrland) which runs between Bräcke and Boden.
A railway between Oslo and Laxå (Northwestern Main Line, Nordvästra stambanan) was also planned, to connect with Western Main Line.

The first parts of the Western and Southern lines were opened in 1856.
Ericson resigned in 1862 when all of the Western line opened, and in 1864 the Southern line was opened in its entirety.
Northwestern line was opened in 1871, Eastern line in 1874, Northern line in 1881 and the line through Upper Norrland in 1894.
When Ericson resigned in 1862 his authority was divided between two agencies (the Building Bureau and the Traffic Bureau) until the formation of Kungliga Järnvägsstyrelsen (the Royal Railway Committee) in 1888.

Ericson died in Stockholm in 1870, aged 68, and lies buried in Stockholm's Northern Cemetery (Norra begravningsplatsen).
In 1823 Nils Ericson joined the Engineering corps of the Swedish Army as a second lieutenant, but in 1830 he transferred to the Navy Mechanical Corps (where he eventually advanced to the rank of colonel in 1850). In 1833 he married a daughter of Count von Schwerin in Östergötland.
Between 1830 and 1850 Nils Ericson planned and directed the construction of the canals at Stallbacka, Säffle, Karlstad and Albrektsund. He also led the construction of the Saimaa Canal in Finland (constructed 1845-52), the reconstruction of the Trollhätte Canal in Trollhättan Municipality and the floodgate at Stockholm. In 1845, he was elected a member of the Royal Swedish Academy of Sciences.
After 1850 he was primarily occupied with the design and construction of the Swedish state-owned railway system. At the same time he led the planning of the Dalsland Canal while construction there was being led by his son Werner.
Sweden started building railways later than many other European countries, having hesitated under heavy debate for several years because of the costs and other issues. Following the Riksdag's decision in 1854, Erikson was chosen to lead the project of building the main lines (stambanorna). There was also a decision that, for military reasons, the railways should avoid the coasts as much as possible.
His proposal was that the line between Gothenburg and Stockholm (Western Main Line, Västra stambanan) should run south of Lake Mälaren to avoid competition with shipping. He also proposed that the line between Malmö and Stockholm (Southern Main Line, Södra stambanan) should go north via Nässjö to meet up with Western Main Line at Falköping until the Western's eastward construction reached Katrineholm, where a better junction could be built with a southern line heading directly to Nässjö.  This line was called Eastern Main Line (Östra stambanan) but has in modern times been defined to be part of the Southern Main Line.  Ericson's proposal also included the railway between Stockholm and Ånge (Northern Main Line, Norra stambanan) and Main Line Through Upper Norrland (Stambanan genom övre Norrland) which runs between Bräcke and Boden. A railway between Oslo and Laxå (Northwestern Main Line, Nordvästra stambanan) was also planned, to connect with Western Main Line.
The first parts of the Western and Southern lines were opened in 1856. Ericson resigned in 1862 when all of the Western line opened, and in 1864 the Southern line was opened in its entirety. Northwestern line was opened in 1871, Eastern line in 1874, Northern line in 1881 and the line through Upper Norrland in 1894. When Ericson resigned in 1862 his authority was divided between two agencies (the Building Bureau and the Traffic Bureau) until the formation of Kungliga Järnvägsstyrelsen (the Royal Railway Committee) in 1888.
Ericson died in Stockholm in 1870, aged 68, and lies buried in Stockholm's Northern Cemetery (Norra begravningsplatsen).
Nils Ericson