The M3 Lee wasn't a total failure, but it was far from ideal. The M3 Lee was simply a stop-gap design until the design of the M4 Sherman could be finished (the United States had little experience designing modern medium tanks; the ones before the Lee were quite poor) put into full production. After seeing the success of the modern Panzer III and IV during the Battle of France, America realized that they were desperately outclassed in the tank department, fielding only M2 Light and a limited number of the obsolete M2 Medium tanks, both woefully inadequate for what they would face on the modern battlefield. The prototype of the M3 Lee was exhibited in February 1941, with full scale production beginning in August 1941. The British version was called the Grant and had a differently-shaped 37 mm turret on top, with a radio inside. The M3 Lee's radio was in the hull.
The M3 Lee was not entirely inadequate, however. Of the 6,258 M3s produced by the U.S., 2,855 M3s were supplied to the British Army, and about 1,386 to the Soviet Union. These tanks were further distributed among these countries' respective allies; Australia received over 700 from the British. The Soviets did not seem to like the Lee, calling it "Братская могила на шестерых" ("a grave for six") The British were the first users of the Lee/Grant and actually continued to use it until the end of the war in the Southwest Pacific and Burma, where it was vastly superior to most Japanese tanks.
The short 75 mm gun M2 and longer 75 mm gun M3 was better than anything the Germans had in North Africa at the time when British Lees first fought there in early 1942. The Germans mostly fielded earlier versions of the Panzer IV armed with the short 7.5 cm gun. They also had many later Panzer IIIs armed with the long 5 cm gun. These guns could defeat the Lee at short range, but the Germans noted that the longer 75mm US gun could kill the Panzers from further away. The Panzer IV Ausf. F2/G, with the long 7.5 cm KwK began to appear in small numbers during the late summer of 1942. This gun was the equal of the Lee's, if not slightly better. The United States fought in North Africa with a mixture of M3 Lees and M4 Shermans, although poor tactics caused heavy losses. By the summer of 1943, US tank forces had gained valuable experience, and the Lee was soon completely out of service. The US continued to use many vehicles based on the Lee, however. A series of successful tank recovery vehicles was created, with a dummy gun and a large winch. These vehicles were replaced in service by another series of similar-looking ones that used the chassis of the M4 Sherman's variants.The M7 Priest self-propelled howitzer used the Lee's chassis and drivetrain.
The M3 Lee was not without its flaws, however. In the early versions, when it was hit, the rivets that held the hull and chassis plates together would pop off and fly around inside the tank as lethal projectiles. The layout of the 75 mm gun was not good. It could only traverse 15 degrees to the left and the right. The turreted 37 mm gun could go 360 degrees around, however. The Lee (and the Sherman after it) had a far wider turning radius than most German tanks.
The M3 Lee was phased out of production by December 1942. The modern M4 Sherman with the long 75 mm gun in a rotating turret had entered the production lines in February of that year. Interestingly, the first M4 Shermans produced used a riveted hull just like the most common version of the Lee, and this feature did not disappear completely from production until the spring of 1943.
Sources:
Sherman: Design and Development, by Patrick Stansell and Kurt Laughlin
Armored Thunderbolt: The US Army Sherman in World War II, by Steven J. Zaloga
БМ-6 Братская могила на шестерых, opoccuu.com (in Russian)
http://afvdb.50megs.com/usa/m3lee.html
http://afvdb.50megs.com/usa/m7priest.html