People who are not looking to buy a BMW will often ask me if buying a 335i is a good idea. And my standard answer is a vague "maybe" followed by "only 2011 and later models though." 2007-2010 cars had the N54 engine which has a bad reputation. So here is what it would take to get me to consider buying a N54 135i, 335i, or 535i.
1. A large bank account of disposable funds because every reason below is going to relate back to this.
2. New turbos. There had better be receipts for a fresh pair of turbos. OEM or better. Turbos are a regular maintenance item on any turbocharged engine. They do not last forever and need service or replacement. The N54 turbos have a number of issues that I would classify as premature failures, at least compared to other turbo engines. It's not uncommon to need service work done on the N54 turbos within 70,000 miles. The common complaints/issues are: wastegate rattle (annoyance but may cause boost issues), oil leaks from the oil lines, oil leaks inside the turbo housing, and water leaks from the coolant lines. These are defects/issues with the BMW components of the turbo system, not the turbo itself which is manufactured by Mitsubishi. Internal turbo parts like spools and compressors seem to hold up well, except for the internal turbo seals. Any N54 that shows oil leaks around the turbos or that blows white smoke from the tailpipe will likely need complete replacement of both turbos. Factor in $2,500-4,000 for this work, including parts and labor. Again - any turbocharged engine will need this kind of work too at some point. But the N54 seems to need it in half the time as a Dodge Neon SRT-4, for example.
3. Water Pump and Thermostat. Electric water pumps fail between 60,000-80,000 miles and without warning. If the pump has not been changed already I would insist on a $800 deduction of the asking price to have it done myself. The thermostat is not really a high failure item but must be removed to access the pump so it's almost always on the repair bill. There are other cooling system issues too but considered normal wear and maintenance, just like any other car.
4. Crankcase Vent system. BMW used a system that is prone to clogging and gumming up with carbon and oil sludge. Instead of an electric pump to separate and circulate oil vapors, the N54 uses a vacuum and cyclone design. Looks simple on paper but over time the oil sludge coats everything inside the valve cover and the system becomes useless. Large amounts of oil form in the intake manifold, chargepipes, and intercooler, and even on the intake valves (see #5 below). The only real fix for this is a thoroughly cleaned or new valve cover and other small enhancements like a stronger crankcase vent valve and an oil catch can. Figure $400-600 for all of the parts and labor.
5. Walnut Blast or Chemical Treatment of Intake Valves. As oil is not vaporized and returned to the oil pan it coats the insides of the intake manifold and the intake valves with sludge. This sludge would normally be sprayed away with gasoline from the fuel injectors but since the N54 is direct injection the fuel spray is further downstream. The oil sludge finds its way in the cylinder head where it will coat the intake valves and harden. This is known as carbon deposits and the only way to remove them is by walnut media blasting or chemical breakdown and scrubbing. It's a big job because you must access the intake valves and it's time consuming. Most BMW repair shops will charge $1,000 or more for this service so factor that into the asking price. And don't forget to address the underlying causes listed in #4 above or else it will just happen again.
6. New or upgraded Diverter Valves and intake Chargepipe. This is not just related to oil circulation problems listed above. Both the Diverter Valve system and the intake Chargepipe are made of plastic. With exposure to heat cycles and stress the plastic cracks. The engine will still operate and run but these cause intake leaks. Under a turbocharged engine with its enormous pressure these are called boost leaks. Why am I paying for a 300hp 335i when it's only making 260 or less? Stronger valves and intake piping is available to improve strength. This is not an automatic reduction in the asking price, especially if the car does not presently show signs of boost leaks, but you could try to haggle the price lower.
7. Spark Plugs and Ignition Coils. Otherwise known as a tune-up. But because the N54 requires spark plug changes every 45,000 miles it's vital that records show this has been done. Ignition coils are typical BMW headaches. Always carry spares to hopefully remedy misfires and rough running. Again, not a price reduction but a reassuring sign if paperwork shows regular care for these items.
8. High Pressure Fuel Pump. This was a recalled several times by BMW so I would insist and assume it has the latest version. There are also fuel pressure sensors that are known to fail and should be replaced.
9. Fuel Injectors. BMW used a innovative and cutting edge Piezo-design fuel injector, there have been teething problems with the fresh design. Just like the HPFP above the injectors should also be the latest design. If the car does not have a warranty, or BMW refuses to install the newest injectors, the replacement cost for a set can be $1,000. And not just any injector can be used. The sophistication is so high that the engine computer (ECU) is matched to the injector version. In other words, if you don't get the exact same version as a replacement you have to replace all six injectors and re-code the ECU to them.
10. No previous use of a piggyback tuner. Piggyback secondary ECU tuners are invasive to the wiring harness and some early versions required permanent taps and splices into existing wires. I don't care who installed it, I'm not going to deal with someone else's shoddy electrical work under my ownership. Checking for this may be difficult as it requires inspecting individual wires near the ECU. But any knowledgeable independent BMW shop will know what to look for. Don't rely on a BMW-trained dealer tech on this one. Flash software is acceptable as it's non-invasive and easily corrected. But if the car had a Cobb or iFlash tool then it should be included in the purchase of the car, especially if the car still has the performance flash installed. The flash tools are usually mated to the VIN so it's useless on another car.
11. VANOS bolts. You might be thinking I'm confused with the S54 but no - the N54 also has issues with VANOS bolts. VANOS is the variable valve timing system that boosts torque at certain RPM. The VANOS system is held in place on the cylinder head by simple hex bolts. These bolts are known for breaking and shearing away, which causes the VANOS units to break away from the engine and fall to pieces in the oil pan. BMW has not issued a wide-scale recall of them but they do have an extended warranty and a generous replacement plan if it does happen. I would only buy an N54 if it was covered under the extended warranty as a repair post-failure will be upwards of $4,000. Preventative replacement of these bolts is easy if the valve cover is removed as in #4 above.
Finally, Intellectual Curiosity. As a BMW parts professional I am naturally curious about how BMWs are made and of the various components and systems within the car. I have to know the ins and outs and details in order to accurately present parts and solutions to shoppers. The N54 is quite interesting from this perspective - it was BMW's first mass-produced turbo gasoline engine since the 1980s 745i. BMW was well versed in turbo Diesel technology but had not had a turbo gas motor in quite a long time. Combined with increased pressures to lower emissions and increase fuel economy and it was a different playing field than previously. My personal opinion is that the N54 was always intended to be an experiment or test bed for the N55 that came later. It's a mutant of the N52 that got out and reproduced - the Spike Gremlin to the N52's cute Gizmo Gremlin. The N54 was a little more than half-baked and never intended as a long term staple of the BMW engine line-up. As such it had a few under-developed systems and problems that were cleared up when the N55 was finally released for 2009 in the X6 and later in 2010 for the E9X. The timing of the N55 in the 3-series was interesting - the 3/2010 production date became 2011 models instead of finishing out the 2010 model year. As if BMW could not wait to ditch the N54 and start selling the N55. I often consider what it would be like to build an N54 and have one that is trouble-free for a year or two. A E60 535i with 600hp sounds quite intriguing.
There are other items too but I would classify them as maintenance items that any used car will need: oil and fluid leaks (gaskets don't last forever), serpentine belts, coolant hoses, filters, and other routine service items. The N54 may have specific problems with each but most other cars do too so I cannot spotlight the N54 for these in this regard. An argument could be made that a car with regular servicing and obvious care may not have as many issues listed above. Care and servicing are signs of a responsible owner but not a guarantee of reliability.
Some of these issues may be over-hyped and should be adjusted for scale. There are hundreds of thousands of N54 engines and experiences will vary. I don't know what the ratio is but I would assume there are far more cars without major problems than with. Not everyone should expect to have to encounter these problems but they should be aware of the potential. About half of this list disappears with the N55 engine, which is a sign that the N55 is a better turbocharged engine. However, there is greater tuning potential for the N54 which makes it the obvious choice if 500+hp is your ultimate goal. I'm not a horsepower junkie so this doesn't really appeal to me.
So it all comes back to the original question - would I buy an N54? Yes, but only if point #1 above were true.