WASHINGTON — President Trump signed a bill into law on Friday that will make it easier for the Department of Veterans Affairs to remove bad employees and promote whistle-blowing.

It is the first step toward fulfilling a campaign pledge by Mr. Trump to make sweeping changes at the beleaguered agency.

The long-sought legislation, called the Accountability and Whistleblower Protection Act, passed Congress by wide margins this month with strong support from both parties. David Shulkin, a hospital management expert and the secretary of veteran affairs, has said the law will make it easier for him to purge problematic workers and restore public trust at an agency still plagued by a 2014 scandal over manipulating patient wait times.

“We must fulfill our duty to the nation’s veterans,” Mr. Trump said at an East Room bill-signing ceremony, flanked by Sgt. Michael Verardo, who before retiring from the Army lost his left arm and left leg to an improvised explosive device in 2010 in Afghanistan. He faced three and a half years of waiting for the department to properly equip his home.