Wiki:
“Many details were fictionalized. The timeframe was changed from the Prohibition era to the postwar era. Chicago became an unnamed fairly-nondescript big city. Al Capone was referred to only as the shadowy “Big Fellow” and photographed only from the rear and was a more diversified mobster rather than primarily a bootlegger (reflecting the change in US organized crime following Prohibition’s repeal).
Also, of course, IRS Criminal Investigator Frank Wilson became IRS Criminal Investigator Frank Warren. Nevertheless, the film authentically portrayed the efforts of Wilson’s team to put together a tax evasion case against Capone, and in many respects, despite the name changes and nondescript settings, the film is a far more accurate depiction of the investigation than later films on the same subject like The Untouchables.
For example, in The Untouchables the judge presiding over Capone’s trial abruptly changes juries in the middle of the case, something that would never happen in real life. What actually happened was that the judge switched jury panels just before the trial began, and the incident is accurately portrayed in The Undercover Man.”