Representative Chris Collins was at the Congressional Picnic on the South Lawn of the White House last summer when he received an unexpected email from the head of a drug company in which he was heavily invested. The company’s only product — an experimental treatment for multiple sclerosis — had just failed a do-or-die scientific trial.

What Mr. Collins did next, apparently in a state of panic, forms the core of a federal indictment unsealed on Wednesday in New York that accuses him of insider trading and lying to federal agents. Federal prosecutors charged Mr. Collins with brazenly using his private information about the company to help his son and others avoid financial disaster.

The charges against Mr. Collins, a New York Republican who was one of President Trump’s earliest and most ardent supporters, stem from his involvement with Innate Immunotherapeutics Limited, a small drug maker based in Australia, which had no approved drugs but several well-placed allies in the capital.

Within minutes of learning about the company’s unsuccessful test, Mr. Collins frantically called his son, Cameron Collins, who, in the days that followed, sold off his stock, avoiding losses of more than $570,000, prosecutors said.