The difference between syntax and morphology is that syntax deals with the structure of sentences and morphology deals with the structure of words. In any language, rules exist that guide the way that words are put together. These are the rules of syntax. Morphology is the study of how words are formed and understood within a language. Both syntax and morphology are related to how meaning is produced with language.
Syntax is a concept that governs the structure of sentences. The order in which words are put together has a bearing on the meaning of a sentence as a whole. Syntax rules must be followed in order for a sentence to be grammatically correct and to make sense to speakers of a language. It is what dictates things such as the order of the subject and verb, and how adjectives and adverbs are used.
Morphology is the study of morphemes, which are the smallest unit of meaning in a language. A morpheme can be one whole word or a prefix or suffix that is understood to change the meaning of the word and therefore takes on meaning itself. Morphology includes the concepts of inflection and derivation, which allow words to be made plural or for the tense of a word to be changed. The study of morphology attempts to understand how people use and understand the way that words work, in an attempt to understand the difference that one morpheme makes to many words and how words relate to each other.
Syntax and morphology are both important to the way that people derive meaning from language, but they are different in that syntax refers to the order and use of words, and morphology refers to the parts of words that create meaning. For example, it is possible to create a sentence that is grammatically correct, but that makes no sense to a speaker of the language. This is possible because syntax only governs the order of a sentence and not what the words in it mean. On the other hand, a combination of words may make sense when used together, but lose their meaning when rearranged in a way that violates the rules of syntax. Syntax and morphology are different but are dependent on each other.