4BSD (4.0) usr/src/sys/sys/TODO (of Nov. 9, 1980) says it was planned:
6. Exec fixes
Implement dmr's #! feature; pass string arguments through
faster.
And the usr/src/sys/newsys/sys1.c has explanation of it and source code.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/sys/TODO
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/sys/newsys/sys1.c
This seems to indicate the idea was not developed separately at
Berkeley.
It was introduced into BSD by April 1981. For 2BSD (2.8) it was added by
Dec. 16, 1981 when built with MENLO_SCRIPT defined (but I don't see that
documented or defined).