In ancient times, did people communicate in classical Chinese?

no. Ancient people used the social spoken language at that time to communicate in their daily lives.

according to the purpose, "language" can be divided into two categories: daily communication language and written language.

everyday communication language is called "spoken language". With the influence of social and economic development, economic and trade exchanges, population mobility and migration, national integration and many other factors, spoken language is changing almost all the time. This change is slow and gradual. If we intercept it according to the times, we can find its obvious differences. For example, the so-called "ancient people" in the question covers the predecessors in history. They lived in different historical times and used different spoken languages.

written language is called "written language", which is specially used for writing articles, that is to say, the existence form of written language is not "words" but "text". For example, classical Chinese, vernacular Chinese, etc., exist in articles and works in classical Chinese and vernacular Chinese. Written language comes from spoken language, but it is relatively independent of spoken language and has its own development law. Its change is often by leaps and bounds. For example, once the written language-classical Chinese, which originated from the spoken language in the pre-Qin period, was formed, it remained almost unchanged except for some new substantive words. Because the classical Chinese is gradually divorced from spoken language, it will inevitably lead to "change" From the Tang Dynasty, some people tried to write articles in the spoken language at that time. By the Song and Yuan Dynasties, the art of storytelling flourished. In order to make people at the bottom of society understand it, the written language of vernacular came into being. Four Great Classical Novels in history is the representative work of this kind of written language. Because this kind of vernacular Chinese is based on the spoken language in Song and Yuan Dynasties, it is more and more different from the later spoken language, and the vernacular Chinese has changed again around the last two decades. People call the vernacular Chinese in Song and Yuan Dynasties "ancient vernacular Chinese", while the newly reformed vernacular Chinese is called "modern vernacular Chinese". After the founding of New China, the pace of language reform has been accelerated, and the current written language is different from the modern vernacular. People call the current written language articles "modern".

the fundamental difference between spoken and written language lies in the different forms of use and different purposes. Spoken language is used in people's daily communication, and written language is used in articles. Although written language comes from spoken language and constantly adapts to the changes of spoken language, there are always differences between them. For example, the written language "modern language" which is closest to modern spoken language is not a verbal communication language. For example, public figures can use written language when they "speak" on specific occasions, but what they usually say is still spoken. For another example, the classical Chinese in the pre-Qin period was close to the spoken language at that time, but the "ancients" at that time did not say "classical Chinese".

In a word, classical Chinese, vernacular Chinese and modern Chinese are all "literary" and belong to written language, and they are not communication languages in daily life. The dialogue between the characters in the costume film and television dramas people see is very "literary". In fact, it is an atmosphere carefully created by the creators, and no one really knows the dialogue between the characters. Even the ancient "quotations" recorded in ancient books were decorated by the author of the book. For example, Zhu Yuanzhang's words recorded in the History of Ming Dynasty are not the real words.