Originally Ted Kord was a student/fanboy of Dan Garrett, adventurer archaeologist and mystery man Blue Beetle. Dan's last adventure involved him and Ted discovering that Ted's crazy uncle was making robots to take over the world, and after quick-changing into the Blue Beetle, Dan died in battle, but not before entrusting the legacy and title of Blue Beetle to Ted. Ted then went to kick his uncle's ass.
Slightly modified into the BTBATB ep "The Fall Of The Blue Beetle" where it's actually TED'S final adventure as Blue Beetle, and no Dan anywhere.