In fact, 同じく does come from 同じ. The key here is to look at the historical form of 同じ: it was originally a regular adjective, following the pattern of the shiku-type adjectives (シク活用形容詞). [1] If it followed the normal development of shiku-type adjectives, it would have become 同じい, which apparently does occur, if rarely. [2]
There are some other -ku adverbs whose adjectivial counterparts are (essentially) extinct in modern Japanese. For example, 如く (as in 〜が如く) was originally derived from the adjective 如し, and similarly べく (as in なるべく) from 可し. (The latter is not a perhaps good example, as some of its other forms survive, e.g. べき, べからず etc.)
There is a (probably) unrelated morpheme -(a)ku which nominalises verbs and adjectives. Examples include 曰く←言う and 思惑←思う. It is unproductive in modern Japanese.