The Berlin–Wrocław railway (German: Niederschlesisch-Märkische Eisenbahn-Gesellschaft, roughly translating as "Lower Silesian-Marcher Railway", NME) was a German private railway that connected Berlin (then capital of the March of Brandenburg, Mark Brandenburg) and Wrocław (in Lower Silesia, then part of Prussia, and called Breslau in German, now in Poland). It is one of the oldest lines in Germany, opened between 1842 and 1847 and acquired by the Prussian government in 1852. In 1920, it became part of the German national railways along with the rest of the Prussian state railways.
Around 1840 all the major countries of the German Confederation began the build main-line railways. From 1837 to 1839, the first German long-distance railway was built in Saxony, the Leipzig–Dresden railway. In 1837 Austria began building its Northern Railway. From 1838 to 1840 the first railways crossing state boundaries (the Magdeburg–Leipzig railway and the Anhalt Railway) were built. More Prussian railway projects soon followed. Thus the Berlin-Frankfurt Railway Company (Berlin-Frankfurter Eisenbahn-Gesellschaft) built an 81 kilometre-long railway between Berlin and Frankfurt (Oder) between 1840 and 1842 and opened it on 23 October 1842. It ran from the Frankfurter Bahnhof (Frankfurt station), later called the Schlesischer Bahnhof, (Silesian Station) in Berlin via Fürstenwalde to Frankfurt (Oder).
In the same year the Lower Silesian-Mark Railway Company (Niederschlesisch-Märkische Eisenbahn-Gesellschaft, NME) was established with the Prussian government participation to build a railway from Berlin to Breslau (Wrocław), then the second largest city in Prussia, where construction of the Upper Silesian Railway (Oberschlesische Eisenbahn) had already started.
The NME completed the first section between Wrocław and Legnica (Liegnitz) on 19 October 1844 before the full route of the line had been determined. A year later, on 1 October 1845, the section to Boleslawiec (Bunzlau) was opened.
On 1 August 1845 the Berlin-Frankfurt Railway Company's shareholders agreed to merge with the NME. The continuation of the NME’s line through Węgliniec (Kohlfurt), Żary (Sorau) and Guben to Frankfurt an der Oder was completed on 1 September 1846, so that the railway extended from Wrocław to Berlin, a total distance of 357 km. The Upper Silesian Railway's network at that time already extended from Wroclaw to Racibórz (Ratibor).