It was started by the Navy way back in the '90s for secure communication online. Then the source was released like a year after being made public and development was funded by the EFF until the Tor Project itself was officially founded.
They still do (or did?) get grants from a few federal agencies though. But they had no strings attached. This is probably what you're thinking of.
Source: Hung out with a few Tor devs in Berlin a few years back. Including He Who Shall Not Be Named.