It may be helpful to first define "metro": Berlin has, like other European cities, two distinct rapid transit systems:
The "S-Bahn", which historically evolved out of the railroad's inner-city and suburban services, and the "U-Bahn", which can be seen as an expansion and/or replacement of tram routes. Even though the "U" stands for "Untergrundbahn", "underground railroad", a significant part of Berlin's U-Bahn is above ground. The S-Bahn (with the "S" being short for "Stadtschnellbahn", "City Rapid Transit") is mostly above ground, but the core north-south trunk is actually underground. Presumably, the question refers to the U-Bahn, so I'll answer accordingly.
The U-Bahn was operated by the city of Berlin's BVG since 1929. Since December 1930, it had a route length of about 76 km (47 miles) and was used by about 270 Million passengers per year. Whereas the track gauge is 1435 mm throughout, about half of the network was built for trains with a width of 2,30 m and a height of 3,10 m ("Kleinprofil", "small profile"), whereas newer routes were built for trains of a width of 2,65 m and a height of 3,40 m ("Großprofil", "big profile").
At the end of World War II, the U-Bahn system was heavily damaged as a result of the Allied's bombings and the "Battle of Berlin". During the latter, retreating SS-troups detonated a bomb in a tunnel below Landwehrkanal, which led to the flooding of about a third of the U-Bahn network as well as the S-Bahn North-South tunnel. Nonetheless, operations on the first segment resumed on May 14th 1945 - six days after the capitulation of the Third Reich, and 19 days after operations had been stopped. At the end of 1945, 69 km (42 miles) were back in operation; all 76 km were active by April 1947.
The division of the Berlin into four sectors (American, Soviet, British, French) did initially not disturb U-Bahn operations much. BVG continued to exist as a single entity. This started to change with the Berlin Blockade beginning on June 24th, 1948: While U-Bahn operations between the Western sectors and the Soviet sector were not stopped, Eastern authorities started to check passengers travelling west to curtail the transfer of goods and money. U-Bahn operations started to be split between BVG in the three Allied sectors and a "BVG-Ost" in the East Berlin. U-Bahn staff was divided between the two BVG-parts and paid in their sectors' variants of Deutsche Mark (i. e., "Westmark" and "Ostmark"). This split obviously also caused operational headaches. For example, both depots in the "Kleinprofil"-part of the network were in the Allied sectors, so BVG-Ost resorted to transfering their Kleinprofil-trains to a Großprofil-depot with road trucks until a rail connection was built in 1952.
Out of the five U-Bahn lines existing at that time, the routes of lines C and D began and ended in Allied sectors, but passed through the Soviet sector in their respective middle parts. Line A ran from the Soviet sector to the Allied sectors. Line B was almost completely in the Allied sector except for the easternmost stop, Warschauer Brücke. Line E was completely in the Soviet sector. In the early 1950ies, BVG (West) installed switches in the last stops in the Allied sectors to allow reversing trains before entering the Soviet sector. This option was first used during the East German uprising on and in the days after June 17th, 1953, but operations had returned to previous levels by July 1953.
East and West Berlin separately started to plan expansions to the U-Bahn network. For West Berlin, the U-Bahn was the only sustainable mode of rapid transit as the tram lines had mostly been closed by then, whereas the S-Bahn in West Berlin was run by East Germany's railroad and thus not suited for expansion for political reasons. Line C was extended northwards in 1958 and a completely new trunk line, fully in West Berlin, was opened in summer 1961.
Also in summer 1961, on August 13th, the GDR started to close the border between the GDR with the Soviet sector of Berlin and the Allied sectors of West Berlin by building the first instance of the future Berlin Wall. This had immediate effects on the U-Bahn: Lines A and B stopped to cross the sector border. For the latter, this meant that the easternmost stop (the only one in the Soviet sector) was mothballed. Line A was divided in two parts, with the section between Thälmannplatz and Gleisdreieck being closed.
Lines C and D continued to be operated over their complete length. However, trains were now exclusively operated by BVG (West) and passed all stations located in the Soviet sector without stopping. The only exception was Friedrichstraße stop on line D, which continued to be served as an interchange to the S-Bahn. Passengers passing between the sectors on either U-Bahn or S-Bahn at Friedrichstraße were subjected to intensive border controls. The East Berlin ghost stations passed by the West Berlin U-Bahn trains were closed off to the public and patrolled by East German border troops. West Berlin paid an annual fee of about 20 million (West-)Mark to BVG-East - now renamed BVB - for the usage and upkeep of the tracks and tunnels on the "corridor" parts of lines C and D.
In effect, Berlin had two separate U-Bahn systems after 1961. While there was cooperation on operational level due to the "transit" lines, the systems were fully split otherwise. Both were extended in their respective areas during the next three decades. However, not least due to the "transit"-sections, no fundamental operational differences evolved; for example, neither system changed voltage or contact system of the railway electrification. Therefore, BVG and BVB were quick to react to the fall of the Berlin Wall on the evening of November 9th, 1989. The first of the closed stops on lines C and D (by now renamed U6 and U8) was reopened on November 11th, the rest followed successively in 1989 and 1990. The two parts of former line A, by now U2, were reconnected in 1993; line B (by now U1/U3) was re-extended to Warschauer Brücke (now Warschauer Straße) in 1995.
Sources (books in German):
Uwe Poppel: Berliner U-Bahn: Zeitgeschichte in Liniennetzplänen – von 1902 bis heute
Arbeitsgemeinschaft Berliner Nahverkehr e.V. und Berliner Fahrgastverband IGEB e.V.: Berliner U-Bahn-Chronik
Jürgen Meyer-Kronthaler, Klaus Kurpjuweit: Berliner U-Bahn – In Fahrt seit Hundert Jahren