Yes, the Defense Advanced Research Projects Agency (DARPA) funded the companies and universities that developed the ARPAnet, which was the foundation upon which internet protocols were developed. The physical components (packet switches, terminal access controllers) were owned by private companies and public universities, so it would be hard to say the government "owned" it. Not to mention that this was in the 1960s and is ancient history.
The "Internet" as we know it did not become "commercial" until much later, and the "web" was only invented in the early 1990s, by a Swiss engineer, which uses the Internet as a transfer mechanism.