It’s bike night at the Harley-Davidson Museum near downtown Milwaukee. Outside this Modernist cathedral of chrome, hundreds of riders have parked their Harleys to admire one another’s bikes, swap stories and enjoy a perfect May evening. Anyone from a corporate marketing department happening on this scene might have been horrified, because it would not suggest a growing market. Bike Night in Milwaukee sure looks like Old White Guys’ Night. The only diversity among this group of aging boomers is in the beer brands in the cozies they carry. But Mark-Hans Richer, who is indeed Harley’s marketing boss, isn’t bothered. “We love old white guys,” says Richer, who is not quite one. “Our old white guys are great customers, we love them, and we never want to walk away from them.”

That said, Harley is in the midst of a complete reimagining as it increasingly tries to appeal to African Americans, Hispanics and women, not to mention riders in China and India, all of whom have become target customers. Global demographics–more young people with less money to spend–are forging big changes at the iconic firm. Harley still sells the rebellious, hell-raising, American free-spirit ideal that it rode to fame in the 1950s and ’60s. But that isn’t a strategy for running a company in 2014.

The Great Recession drove Ford to the wall and Chrysler and GM into bankruptcy, forcing drastic operational and cultural changes that made them more efficient, higher-quality operators. Harley was in better shape than the auto companies going into the recession but fared worse after the downturn: motorcycles are typically a second or third ride for Americans. Harley’s sales plunged from $5.8 billion in 2006 to $3.1 billion in 2010, even as autos were recovering. Its U.S. market share fell from 51% in 2006 to 43% in 2008, according to the Trefis research firm. The average age of its customers increased to 49 from 44.

Worse, perhaps, is that when sales turned up again, Harley reverted to form. And form wasn’t particularly good. Harley’s product line was full of retreads, and it had little to offer consumers in emerging markets like India and China. “There was a recognition that it was a great company, 108 years old,” says CEO Keith Wandell, a former auto-parts executive who took over in 2009 and began to force Harley to behave. “A lot of great things had happened, but I think what was apparent was that we’d become stuck in time. We had become sort of resistant to change and doing things differently.”

This year Harley’s sales should increase 9.7%, to $6.5 billion, and it will move perhaps 283,000 motorcycles. It’s introducing new lower-powered, lower-priced models for young riders and taking its biggest technology risk ever: the LiveWire, an electric-powered, urban globocycle whose high-pitched, jetlike whine sounds nothing like the Harley roar–that hurricane of sound that tells you a V-twin gas-engine hog is approaching even before you check your rearview. “We have a powerful brand and a powerful product–that’s why we are doing this. It isn’t the better-mousetrap strategy,” says Wandell. If the bike sells, it will punctuate the turnaround of a uniquely American corporation.

The electric Harley sitting on a small test track behind the company’s development center in Wauwatosa, outside Milwaukee, isn’t going to be confused with some of the putt-putt electrics on the market today. The design of LiveWire is gnarly enough to be Harley: it’s angular and agile, with a cast-aluminum exoskeleton sitting on a short wheelbase with 18-in. tires. The tires are a little bigger than normal and the seat a little higher, so the cycle can more easily jump curbs and handle the potholes of New Delhi or New York City. The turn signals and rear lamp are glowing LEDs, like those found on high-end Audis. What’s missing is the steroidal engine sitting under the rider–replaced by a lithium-ion-battery-powered motor.

In electric cars, the compartment for the battery that powers the vehicle takes up a disproportionate amount of space and produces a lot of heat that has to be dissipated. That’s a lot harder to do on a bike. Engineers jammed as much battery into the bike as they could to deliver sufficient acceleration. LiveWire generates 75 horsepower and goes from zero to 60 m.p.h. in four seconds.

Sound was another challenge because Harleys rumble even at low r.p.m.–a sound referenced, onomatopoeically, as potato, potato, potato. The LiveWire’s gearbox-and-motor combo produced a new and somewhat unexpected sound, which the engineers tuned. “We knew immediately we had something cool,” says Jeff Richlen, the chief engineer.

What’s it like to ride? The beauty of all electric motors is that you get torque–the force that turns the wheels–on command. You don’t have to go through the gears. Twist the throttle and LiveWire responds like an impatient New Yorker, even if the engine growl lags. (The pedal-to-engine-noise disconnect is familiar to owners of electric cars like the Chevrolet Volt, Toyota Prius and Nissan Leaf.) LiveWire’s speed tops out at 92 m.p.h, by which time it sounds like a big Fourth of July rocket whizzing by. “We wanted to make this a real Harley,” says Richlen. Right now, the bike has a range of 100 miles–fine for city riding–and recharges in about three hours.

Harley isn’t releasing LiveWire for sale until customers and dealers have a chance to weigh in. The company began offering test rides to select customers this month. Can they accept any battery-powered bike as a true Harley? Yes, says Gail Worth, who owns Gail’s Harley-Davidson, located outside Kansas City, Mo. “The world is ready for a Harley-Davidson e-bike,” she says. “Electric bikes are going to be on the street. That is the one element left that will allow Harley to just take over the motorcycle market.” Harley hasn’t priced its rocket yet, but as with electric automobiles, consumers will typically pay a 10% to 20% premium for electric bikes, which suggests something north of $20,000. Worth expects LiveWire to debut in a year.

The electric-motorcycle market is generating a lot of interest these days. BMW already sells a $22,500 C Evolution e-Scooter in Europe. Although the market for e-cycles is still small, the consultancy Navigant Research predicts that domestic sales will grow tenfold and reach 36,000 units by 2018. A couple of specialty manufacturers, such as Brammo and Zero, are already in the market. Harley says it isn’t worried about being late to market. “If it’s green, it’s badass green. It has character,” says Richer. “We don’t see our competitor understanding that.”

Livewire isn’t just a flashy new concept for Harley; it’s also the product of a painful corporate revolution long in the making. In the depths of the downturn, the company produced print ads that proclaimed, “We don’t do fear … Screw it, let’s ride.” The bravado was a misdirected rallying cry. “We were heading downhill–not spiraling but walking down this hill pretty fast,” says Worth, who also heads Harley’s dealer council. Sales of the company’s best-selling heavy bikes fell 50%.

When Wandell arrived in 2009, sales had begun to pick up, but the company had no new products in the pipeline to meet the increasing demand. Harley’s 1,500 dealers vented, but Harley’s product-development cycle was so sluggish that the company needed far more time to get new products to market than the competition: some five to six years. New cars are created in half that time.

Global regard for the Harley brand had long insulated it from bad management. In 1969 a conglomerate named AMF, which you might know from its bowling pins, bought Harley. The motorcycle company suffered from corporate inattention, and in 1981 a management-led investor group bought it back. But it remained a boom-bust outfit that relied on periodic economic upticks to bail it out.

Wandell spent most of his career at Johnson Controls, an auto-components maker. So his being chosen to become Harley’s boss attracted some criticism–he wasn’t a Harley guy. But Wandell quickly drew up a “short list of big things” that had to change: how the company designed products, how it made them and how it interacted with customers. Everything, in other words. He replaced all but one of the top bosses, mostly with talent he found being squandered in middle management.

One of those talented people was Michelle Kumbier, whom Wandell tapped to reshape Harley’s product development. Though not an engineer, Kumbier took an engineer’s approach, benchmarking the company against other manufacturers like Ford. Then she shared the not-so-pretty results: by any measure, Harley was a laggard in both product-development cycles and manufacturing efficiency. “Engineers were able to accept the truth if you showed them the data and the evidence. We showed them the road map. This is how we are going to get to world class.” Since then Harley has cut its time to market in half.

In another big shift, Harley says it has become customer- and dealer-led. Worth says the listening is real. “It used to be lip service,” she says. “‘Let’s sit down and have a beer.’ They’d fix onesie-twosie things. Now they handle it as business. We don’t sit around drinking beer with each other anymore.” Oddly enough, for an outfit with such a devoted following, Harley used to build products based on its managers’ gut feelings, which was fine when the customers were mostly white boomers. But now the customers could be newly wealthy Chinese looking for style, city-dwelling millennials who need utility and affordability or retirees who want a trike that doesn’t embarrass them.

That shift led to a company initiative code-named Rushmore, whose mission was to produce new products for this multiculti world. Harley took a fresh look at every aspect of motorcycling–the issue of the rider’s head being buffeted by wind, the position of the saddlebags, the passenger’s viewpoint–and integrated new technology like GPS. How, for instance, could a rider use a touchscreen while going 80 m.p.h. and wearing leather riding gloves? The research led to more than 106 changes in the way that its touring bikes are built.

Harley-Davidson’s plunge into advanced technology–a third of its engineering is now focused on innovation–led it to LiveWire. A small group of developers was freed to work on the project. “It’s a symbol of what we can be,” says Matt Levatich, Harley’s president, “not what we shouldn’t do. Why not us?”

More immediately, Rushmore yielded something that wouldn’t have been contemplated before: smaller bikes for younger riders, especially women. This year Harley introduced its lower-end Street series, high-riding bikes with 500-cc and 750-cc engines that still provide a Harley feel for less than $7,500. “Street is about access over engine displacement,” says Richer. “It is designed with a global customer in mind. You can grow up in Beijing and Chicago, and you might have a cultural connection that your parents didn’t have 25 years ago.”

With Street, the company now has models that can compete in developing nations such as Brazil, South Africa and India, where price matters. Harley is a latecomer to India, but it is now assembling bikes in Bawal and sponsoring group rides in places like Goa that can attract 5,000 cyclists who want to taste the American ideal. Harley is feeding that hunger: overseas cycle sales now account for 36% of the company’s total. Indeed, there are now group-ride events in China, Africa and India.

The smaller bikes are also a better fit for Europe, where consumers prefer sport and utility cycles like Street over Softail cruisers. In China, Harley doesn’t have the opportunity that American automakers have. Motorcycles are banned from many highways and urban areas. But just as they prefer big Buicks, Chinese riders are hog lovers, as are riders in Japan, home to giants such as Yamaha and Kawasaki.

So far, the strategy appears to be working. Harley has picked up two market-share points in Europe on BMW. And while Street models are now heading to U.S. dealers, the company is living you-know-where on the hog with its traditional cruiser bikes. It owns 56% of the market, up from 41.5% in 2008, according to Wells Fargo Securities. Even better, the supply of white guys over age 35 figures to be about 50 million strong in the U.S. for the next 25 years. “We’re not dying a slow death,” says Levatich. “We’re creating a new future.”

TO SEE MORE SOLUTIONS, GO TO time.com/solutionsforamerica

This appears in the June 30, 2014 issue of TIME.

Contact us at letters@time.com.