WASHINGTON—A top White House budget official tasked with freezing security aid to Ukraine raised legal concerns about the hold before another official assumed responsibility for the funds, according to the transcript of his testimony to impeachment investigators released Tuesday.

Mark Sandy, the deputy associate director for national-security programs at the Office of Management and Budget, told House investigators that he flagged concerns to his boss at OMB that the hold could violate appropriations laws. Mr. Sandy, a career...