Boeing began work on pressurized long-range bombers in 1938, in response to a United States Army Air Corps request. Boeing's design study for the Model 334 was a pressurized derivative of the Boeing B-17 Flying Fortress with nosewheel undercarriage. Although the Air Corps did not have money to pursue the design, Boeing continued development with its own funds as a private venture. In April 1939, Charles Lindbergh convinced general Henry H. Arnold to produce a new bomber in large numbers to counter the Nazi production. The Air Corps issued a formal specification for a so-called "superbomber", capable of delivering 20,000 lb (9,100 kg) of bombs to a target 2,667 mi (4,290 km) away and capable of flying at a speed of 400 mph (640 km/h) in December 1939. Boeing's previous private venture studies formed the starting point for its response to this specification.
Boeing submitted its Model 345 on 11 May 1940, in competition with designs from Consolidated Aircraft (the Model 33, later to become the B-32), Lockheed (the Lockheed XB-30), and Douglas (the Douglas XB-31). Douglas and Lockheed soon abandoned work on their projects, but Boeing received an order for two flying prototypes, given the designation XB-29, and an airframe for static testing on 24 August 1940, with the order being revised to add a third flying aircraft on 14 December. Consolidated continued to work on its Model 33 as it was seen by the Air Corps as a backup in case of problems with Boeing's design. Boeing received an initial production order for 14 service test aircraft and 250 production bombers in May 1941, this being increased to 500 aircraft in January 1942. The B-29 featured a fuselage design with circular cross-section for strength. The need for pressurization in the cockpit area also led to the B-29 being one of very few American combat aircraft of World War II to have a stepless cockpit design, without a separate windscreen for the pilots.
Manufacturing the B-29 was a complex task. It involved four main-assembly factories: a pair of Boeing operated plants at Renton, Washington (Boeing Renton), and Wichita, Kansas (now Spirit AeroSystems), a Bell plant at Marietta, Georgia ("Bell-Atlanta"), and a Martin plant at Omaha, Nebraska ("Martin-Omaha" - Offutt Field). Thousands of subcontractors were involved in the project. The first prototype made its maiden flight from Boeing Field, Seattle on 21 September 1942. The combined effects of the aircraft's highly advanced design, challenging requirements, and immense pressure for production, hurried development and caused setbacks. The second prototype, which, unlike the unarmed first, was fitted with a Sperry defensive armament system using remote-controlled gun turrets sighted by periscopes, first flew on 30 December 1942, this flight being terminated due to a serious engine fire. On 18 February 1943, the second prototype, flying out of Boeing Field in Seattle, experienced an engine fire and crashed. The crash killed Boeing test pilot Edmund T. Allen and his 10 man crew, 20 workers at the Frye Meat Packing Plant and a Seattle firefighter. Changes to the production craft came so often and so fast that in early 1944, B-29s flew from the production lines directly to modification depots for extensive rebuilds to incorporate the latest changes. The AAF contracted modification centers and its own air depot system struggled to cope with the scope of the requirement. Some facilities lacked hangars capable of housing the B-29 (which) combined with freezing cold weather further delaying the modifications, such that at the end of 1943, although almost 100 aircraft had been delivered, only 15 were airworthy. This prompted an intervention by General Hap Arnold to resolve the problem, with production personnel being sent from the factories to the modification centers to speed modification of sufficient aircraft to equip the first Bomb Groups in what became known as the "Battle of Kansas". This resulted in 150 aircraft being modified in the six weeks between 10 March and 15 April 1944.
The most common cause of maintenance headaches and catastrophic failures were the engines. Although the Wright R-3350 Duplex-Cyclone radial engines later became a trustworthy workhorse in large piston-engined aircraft, early models were beset with dangerous reliability problems. This problem was not fully cured until the aircraft was fitted with the more powerful Pratt & Whitney R-4360 "Wasp Major" in the B-29D/B-50 program, which arrived too late for World War II. Interim measures included cuffs placed on propeller blades to divert a greater flow of cooling air into the intakes which had baffles installed to direct a stream of air onto the exhaust valves. Oil flow to the valves was also increased, asbestos baffles installed around rubber push rod fittings to prevent oil loss, thorough pre-flight inspections made to detect unseated valves, and frequent replacement of the uppermost five cylinders (every 25 hours of engine time) and the entire engines (every 75 hours).
Pilots, including the present day pilots of the Commemorative Air Force’s Fifi, the last remaining flying B-29, describe flight after takeoff as being an urgent struggle for airspeed (generally, flight after takeoff should consist of striving for altitude). Radial engines need airflow to keep them cool, and failure to get up to speed as soon as possible could result in an engine failure and risk of fire. One useful technique was to check the magnetos while already on takeoff roll rather than during a conventional static engine-runup before takeoff.
In wartime, the B-29 was capable of flight at altitudes up to 31,850 feet (9,710 m), at speeds of up to 350 mph (560 km/h) (true airspeed). This was its best defense, because Japanese fighters could barely reach that altitude, and few could catch the B-29 even if they did attain that altitude. Only the heaviest of anti-aircraft weapons could reach it, and since the Axis forces did not have proximity fuzes, hitting or damaging the aircraft from the ground in combat proved difficult.
The revolutionary General Electric Central Fire Control system on the B-29 directed four remotely controlled turrets armed with two .50 Browning M2 machine guns each. Some turrets were made according to patents from the Tucker Gun Turret. All weapons were aimed optically with targeting computed by analog electrical instrumentation. There were five interconnected sighting stations located in the nose and tail positions and three Plexiglas blisters in the central fuselage. Five General Electric analog computers (one dedicated to each sight) increased the weapons' accuracy by compensating for factors such as airspeed, lead, gravity, temperature and humidity. The computers also allowed a single gunner to operate two or more turrets (including tail guns) simultaneously. The gunner in the upper position acted as fire control officer, managing the distribution of turrets among the other gunners during combat. The tail position initially had two .50 Browning machine guns and a single M2 20 mm cannon. Later aircraft had the 20 mm cannon removed, and sometimes replaced by a third machine gun.
In early 1945, Major General Curtis Lemay, commander of XXI Bomber Command, the Marianas-based B-29-equipped bombing force — that resulted in the affected aircraft having as little defensive firepower as the atomic mission-intended Silverplate B-29 airframes — ordered most of the defensive armament and remote-controlled sighting equipment removed from the B-29s under his command so that they could carry greater fuel and bomb loads as a result of the change of role from high-altitude, daylight bombing with high explosive bombs to low-altitude night raids using incendiary bombs. As a consequence of this requirement, Bell Atlanta (BA) produced a series of 311 B-29Bs that had turrets and sighting equipment omitted, except for the tail position, which was fitted with AN/APG-15 fire control radar. This version could also have an improved APQ-7 "Eagle" bombing-through-overcast radar fitted in an airfoil shaped radome under the fuselage. Most of these aircraft were assigned to the 315th Bomb Wing, Northwest Field, Guam.
The crew enjoyed, for the first time in a bomber, full-pressurization comfort. This first-ever cabin pressure system for an Allied production bomber was developed for the B-29 by Garrett AiResearch. The nose and the cockpit were pressurized, but the designers were faced with deciding whether to have bomb bays that were not pressurized, between fore and aft pressurized sections, or a fully pressurized fuselage with the need to de-pressurize to drop their loads. The solution was a long tunnel over the two bomb bays so as not to interrupt pressurization during bombing. Crews could crawl back and forth between the fore and aft sections, with both areas and the tunnel pressurized. The bomb bays were not pressurized.