Méi 没/沒 and méiyǒu 没有/沒有 are mainly used to negate past or not yet completed actions, possession and existence.
The verb yǒu 有 can express possession ‘to have’ and ‘existence’ ‘there is; there are’. It is the only verb always negated by méi 没/沒.
Before an action verb méi 没/沒、méiyǒu 没有/沒 ‘not’ implies the non-occurrence or non-completion of an action.
Méi 没/沒 and méiyǒu 没有/沒有 are used interchangeable about non-completed actions. However, méi 没/沒 is more casual and often preferred in speech, while méiyǒu 没有/沒有 is slightly more formal and common in writing.
Also check: The Negation adverb bù 不‘not’

Structure
Basic form
The negation adverb méi 没/沒、méiyǒu 没有/沒有 ‘not’ is placed before a verb. If the verb is yǒu 有 ‘to have; there is; there are’ only méi 没/沒 can be used.
In spoken Chinese, yǒu 有 is sometimes omitted when negating existence or possession with short, concrete nouns like qián 钱/錢 ‘money’, chē 车/車 ‘car’, rén 人 ‘person’ or fixed phrases, like méi shì 没事/沒事 ‘never mind’ or méi bànfǎ 没办法/沒辦法 ‘there is nothing to be done’.
With other verbs, the main verb cannot be dropped.
The aspectual particle guo 过/過 indicates events that have been experienced in the past and is negated using méi 没/沒. For added emphasis, méiyǒu 没有/沒有 can also be used in place of méi 没/沒.
Also check: Aspectual particle le 了 1
Also check: Aspectual particle guo 过
Question
There are two ways to form a yes-no question.
One way is to add the question particle ma 吗/嗎 at the end of the sentence.
Another way to form a yes-no question is by combining the affirmative and negative forms of the verb.
If the main verb is not yǒu 有 the affirmative and negative forms of yǒu 有 can also be used before the main verb.
With adverbs
Adverbs like yě 也 ‘also’, dōu 都 ‘all, both’ and hái 还/還 ‘still’ are usually placed before méi 没/沒、méiyǒu 没有/沒有 ‘not’.
With prepositional phrases
Méi 没/沒、méiyǒu 没有/沒有 ‘not’ usually come before a prepositional phrase. In speech méi 没/沒 is preferred.
Méi 没/沒、méiyǒu 没有/沒有 ‘not’ is sometimes placed directly in front of the verb, only negating the verb. This structure is mainly used for emphasis or contrast.
Functions
1. Méi 没/沒、méiyǒu 没有/沒有 ’not’ Expressing Non-occurrence or Non-completion of an action
Before an action verb méi 没/沒、méiyǒu 没有/沒有 ‘not’ shows that an action did not happen or is not completed. The action often, but not always, took place in the past. The time is often indicated by a time expression or can be inferred from the context.
If you want to indicate that an action remains incomplete up to now, but is expected to be completed in the future, you can place hái 还/還 ‘still’ before méi 没/沒、méiyǒu 没有/沒有 ‘not’.
When talking about past experiences, something you never did or tried, the aspectual particle guo 过/過 is included to mark the experiential aspect and combines with méi 没/沒 to deny any prior experience.
Also check: Aspectual particle le 了 1
Also check: Aspectual particle guo 过
2. Méi 没/沒 ’not’ Expressing Non-existence or Non-possession of something
With the verb yǒu 有 ’to have; there is; there are’ méi 没/沒 ‘not’ indicates lack of possession or nonexistence.