Both the Bhagavad Gita and the Analects of Confucius are about duty. They argue that individuals have social responsibilities that take precedent over personal preference and even personal principles.
The Bhagavad Gita is a dialogue between humanity, represented by Prince Arjuna, and the eternal, represented by the divine Lord Krishna. The subject at issue is duty, or more accurately, dharma. "Duty" is not a perfect translation of the Sanskrit word dharma, but it's close: dharma is the behavior required to maintain "rta," the good order of the universe.
The conflict at the heart of the Bhagavad Gita is between personal principle and dharma. Arjuna is about to go to war with the Kauravas. He has relatives, teachers, and beloved friends among them. His personal principle tells him, as it would tell anyone, not to fight. Dharma, in the form of Krishna, tells him otherwise. It reminds him that human perspective is limited and that, though a great hero, his own life is ephemeral. There are greater things than Arjuna, says Lord Krishna, and dharma, the right way of living that serves that greater order, is more important than Arjuna's own feelings.
The Analects makes the same argument directly, without the dialogue. One of the most important concepts in Confucian thought is "li." Like "dharma," it doesn't quite translate to English, but a good start might be "good order." Li represents the concrete behavior expected from people of every kind, fulfilling every role in society that makes that society run smoothly (see reference). The Analects present thoughts on how li may be achieved and call on the reader to behave accordingly, just as the Gita presents a dialogue about dharma and calls upon Arjuna, and thereby the reader, to fulfill it.
Despite being separated by hundreds of miles and radically different cultures, there is a thread of unity between the Bhagavad Gita and the Analects. Both acknowledge the existence of an order beyond worldly life, and both ascribe the highest moral value to following it rather than personal inclination.