The Talmud (Shab. 21b) describes the miracle of the oil and, while adding that in the following year the people celebrated with Hallel and thanksgiving, says nothing about kindling Chanukah lights.
It appears that the kindling of lights developed over time, first as an individual or family practice and then made obligatory by rabbinic ordinance.
There are various discussions in rabbinic literature about how, when and where the lights should be kindled, leading to a major controversy between Bet Shammai and Bet Hillel (in the later part of the 1st century CE) as to the sequence to be followed – starting with eight lights on the first night and then reducing to one, or vice-versa, starting with one and building up to eight. The status given to the lights by the sages showed their wish to focus, not on the military victory but on the spiritual aspect.
The dichotomy is reflected in the Al HaNissim prayer which is said on the festival and alludes to both aspects.