| Year | Title | Role | Notes |
| 1978 | The Awakening Land | Will Beagle | Miniseries; credited as W.H. Macy |
| 1982 | Another World | Frank Fisk | Credited as W.H. Macy |
| 1983 | The Cradle Will Fall | Ben Duffy | Television film, credited as W.H. Macy |
| Sitcom | Chip Gooseberry | Television film, credited as W.H. Macy |
| 1984 | The Boy Who Loved Trolls | Socrates the Turtle | Voice, television film; credited as W.H. Macy |
| The Dining Room | Arthur, Charlie, Architect, Billy, Nick, Fred, Tony, Standish | Television film, credited as W.H. Macy |
| 1985 | Joanna | Napoleon Flipper | Short film; credited as W.H. Macy |
| Hometown | Loring Dixwell | Episode: "Mary's Yen"; credited as W.H. Macy |
| 1985–88 | Spenser: For Hire | Efrem Connors | 3 episodes; credited as W.H. Macy |
| 1986 | Kate & Allie | Carl | Episode: "General Hospital"; credited as W.H. Macy |
| 1987 | The Equalizer | Dr. Spaulding | Episode: "Hand and Glove"; credited as W.H. Macy |
| Alive from Off Center | Uncredited | Episode: "As Seen on TV" |
| 1988 | The Murder of Mary Phagan | Randy | Miniseries; credited as W.H. Macy |
| Lip Service | Farmer | Television film; also director; credited as W.H. Macy |
| 1989 | Tattingers | Myron | Episode: "Tour of Doody"; credited as W.H. Macy |
| 1990 | ABC Afterschool Specials | Store Clerk | Episode: "All That Glitters" |
| 1990–92 | Law & Order | John McCormack, Powell | 2 episodes |
| 1992 | In the Line of Duty: Siege at Marion | Ray Daniels | Television film |
| Civil Wars | Donald Patchen | Episode: "Denise and De Nuptials" |
| A Private Matter | Psychiatrist | Television film |
| The Water Engine | Charles Lang | Television film |
| A Murderous Affair: The Carolyn Warmus Story | Sean Hammel | Television film |
| The Heart of Justice | Booth | Television film |
| 1993 | Bakersfield P.D. | Russell Karp | Episode: "Cable Does Not Pay" |
| Law | Bernard Ruskin | Episode: "Rhyme and Punishment" |
| 1994–2009 | ER | Dr. David Morgenstern | 31 episodes |
| 1994 | Texan | Doctor | TV short |
| 1995 | In the Shadow of Evil | Dr. Frank Teague | Television film |
| Mystery Dance | Bob Wilson | Episode: "Episode " |
| 1996 | Andersonville | Col. Chandler | Miniseries |
| The Writing on the Wall | Petrocelli | Television film |
| 1998 | Superman: The Animated Series | The Director (voice) | Episode: "Where There's Smoke" |
| The Con | Bobby Sommerdinger | Television film; also writer |
| The Lionhearts | Leo Lionheart (voice) | 13 episodes |
| King of the Hill | Dr. Rubin (voice) | Episode: "Pregnant Paws" |
| Hercules | Jorgen Svenson, Sven Jorgenson (voices) | Episode: "Hercules and the Twilight of the Gods" |
| 1999 | Frasier | Ralph | Episode: "Good Samaritan" |
| A Slight Case of Murder | Terry Thorpe | Television film; also writer |
| The Wild Thornberrys | Skoot (voice) | Episode: "On the Right Track" |
| 1999–2000 | Batman Beyond | Aaron Herbst, Karros (voices) | 2 episodes |
| 1999–2000 | Sports Night | Sam Donovan | 6 episodes |
| 1999 | The Night of the Headless Horseman | Ichabod Crane | Television film |
| 2001 | Nature | Narrator | Episode: "Polar Bear Invasion" |
| 2002 | Door to Door | Bill Porter | Television film; also writer |
| It's a Very Merry Muppet Christmas Movie | Glenn | Television film |
| 2003 | Out of Order | Steven | Miniseries |
| 2004 | Reversible Errors | Arthur Raven | Television film |
| The Wool Cap | Charlie Gigot | Television film; also writer and producer |
| 2006 | The Simpsons | Himself (voice) | Episode: "Homer's Paternity Coot" |