KAZAN, Russia — The first autograph Katie Ledecky signed Sunday after winning the 400-meter freestyle by four seconds was on a piece of paper attached to a clipboard carried by a doping control agent.

Racing on the opening night of swimming at the world championships, Ledecky completed the eight-lap final in 3 minutes 59.13 seconds to give the United States its first and only gold. The effort, 0.76 of a second off her year-old world record, gave Ledecky the three fastest swims in the event. She owns six of the top seven performances, her string interrupted only by Federica Pellegrini’s 3:59.15 from this meet in 2009, achieved in one of the buoyant polyurethane tech suits that were banned soon thereafter.

Ledecky, 18, burst onto the world scene after the age of the performance-enhancing swimsuits, which provided a two-year distraction from the sport’s real scourge. That would be doping, which has cast a long shadow over swimming since the 1970s, enveloping every exceptional performance.

The shadow threatened to blot out Heat 5 of the women’s 100 butterfly preliminaries. To the right of the American Kendyl Stewart was Natalia Lovtsova, who was returning to international competition after serving a second doping-related suspension. After beating Lovtsova by more than a second, Stewart said, “It kind of sucks to hear that people are doing that, but I try not to let it get into my head.”

Lovtsova, perhaps showing the rust from two years away from competition, was timed at 59.11 and did not advance to the semifinals. Sun Yang of China, who was sidelined three months in the middle of last year after a failed doping test in May 2014, picked up where he had left off at the Asian Games last September. He successfully defended his title in the 400-meter freestyle with a time of 3:42.58, the fastest recorded in the world this year.

In his news conference afterward, Sun took umbrage at a doping-related question.

“I don’t understand why the media pay so much attention and over-promote this story,” he said, adding, “The world always thinks that whenever a Chinese athlete gets a good result, we have used some drugs.”

The truth, Sun said, is “we are training very hard.”

The doping culture in Olympic sports has created a climate in which clean athletes are contaminated by the actions of the cheaters. A weekend report by The Sunday Times of London and the German television channel ARD further polluted the rarefied air of elite sport. After reviewing results from 12,000 blood tests from 5,000 track and field athletes, which had been leaked to them by a whistle-blower, the news outlets concluded that doping was rampant, with athletes increasingly using blood transfusions and microdoses of the hormone EPO to increase their counts of red blood cells.

The report’s findings also pointed to systematic doping in Russia, which was already being investigated by an independent commission formed last December and headed by Dick Pound, the former president of the World Anti-Doping Agency. Swimming in Russia has come under scrutiny. Since 2011, more than a dozen Russian swimmers have failed doping tests, including the 16-year-old backstroke specialist Daria K. Ustinova. She was 14 when her sample came back positive in 2012. In an interview Sunday, she said it was “an accident” that had resulted from a medication prescribed by an “ordinary doctor” she saw when she was sick. The doctor, she said through an interpreter, did not know she was an athlete subject to WADA testing.

Kirsty Coventry, a two-time Olympic gold medalist and a member of WADA’s athlete committee and the International Olympic Committee’s Athlete Commission, said cases like Ustinova’s, where the culpability is not clear, were the reason many in sports were reluctant to implement lifetime bans after first offenses.

But the case of Lovtsova, who is still competing after two doping suspensions, makes Coventry angry.

“I don’t understand why you should get another chance,” she said.

In the wake of the spate of failed drug tests of Russian swimmers, Coventry said the I.O.C.’s Athlete Commission gained assurances from Russia’s antidoping organization that it had cleaned house and had appointed officials who were well versed on the rules.

“At some point you’ve got to kind of have faith in the system,” Coventry said, “so that’s what we’re trying to do.”

Some athletes may seek any edge in the pursuit of world records for fame and fortune’s sake, but Ledecky’s motivation appears more intrinsic. After her race, Ledecky was asked if she had reached the point where it was disappointing not to finish with a world record every time she stepped on the blocks.

“Maybe it disappoints you guys, but it doesn’t disappoint me,” she said. “I respect the process. It’s nothing I really get too hung up about.”

Her coach, Bruce Gemmell, said: “For Katie, it’s almost the thrill of the chase. I think she’s driven to set the bar higher.”

On Tuesday, Ledecky hopes to pull off a double that defies belief. If she places in the top 16 in the 200 freestyle preliminaries in the morning, as expected, she will compete in the semifinals of the 200 free at night, about 20 minutes after the final of the 1,500 free, an event in which she holds the world record. The last time Ledecky raced a 1,500-meter freestyle internationally, she won by 40 meters.

The degree of difficulty led Ledecky to pass on the double at the 2013 world championships. So why try it now?

“I don’t feel like I just want to do the same thing I did last time; I want to add something,” Ledecky said. “Since I qualified in the 200, I want to give it my best shot and see how it goes.”

Those inclined to believe that what Ledecky is trying to pull off is impossible without swimmers’ little pharmaceutical helpers should talk to Conor Dwyer, a fellow member of the American team at the worlds. At the pre-Olympics training camp, Dwyer said, “Some of the mile guys were like, ‘I don’t want to swim with Katie,’ because she can swim that fast.”

After spending a few weeks this year training at altitude alongside Ledecky, Dwyer could feel the milers’ humiliation.

“She was throwing down times that I’ve never seen a female do, so it really doesn’t surprise me when I see her breaking world records at every meet she goes to,” he said. “She deserves to be that fast because of what I’ve seen her do in practice.”

A version of this article appears in print on , on Page D6 of the New York edition with the headline: Shadow of Doping Is Never Far From Pool. Order Reprints | Today’s Paper | Subscribe