The hacking attack on Macron's campaign, just hours ahead of Sunday's run-off vote that saw him elected, led to thousands of files being leaked online.
“We had become aware of Russian activity,” Admiral Mike Rogers told a Senate Armed Services Committee hearing.
“We had talked to our French counterparts prior to the public announcements of the events that were publicly attributed this past weekend and gave them a heads up.
“'Look, we're watching the Russians, we're seeing them penetrate some of your infrastructure. Here's what we've seen, what can we do to try and assist?'” said Rogers, who also heads US Cyber Command.
The NSA chief did not specify what type of “infrastructure” has been compromised. He said that the agency was in contact with its counterparts in Britain and Germany ahead of elections in those countries later this year.
Rogers drew comparisons between the hack targeting Macron and those of the US Democratic Party and a close aide to presidential candidate Hillary Clinton ahead of the November election won by Donald Trump.
Washington has officially accused Russia of being behind those hacks, saying Moscow was trying to boost Trump's chances of victory.
“The Russians appear to be assessing that some leaders might be more inclined to be supportive of their positions,” Rogers told lawmakers.
“You saw that just play out in the French election where there clearly was a difference between these two candidates and their views of Russia,” he said.
Thousands of emails and documents from Macron's campaign were dumped online by hackers shortly before midnight in France on Friday and were then relayed by anti-secrecy group WikiLeaks.
A statement from the 39-year-old Macron called it a “massive and coordinated” hack. Paris prosecutors have opened a probe into the attack, a source close to the investigation has said.