Praise be to Allah.
We ask Allaah to forgive your sin and to conceal your fault, and to help you avoid temptations both obvious and hidden. With regard to your question, it can be answered in the following points:
1 – It seems from your question that the one whom you accused of committing forbidden actions is a specific woman whom you and your cousin know. If it is a specific, known, woman, then this is slander by you against her, which is a major sin and an abhorrent forbidden action, because it is a slander against her honour and a transgression of the limits set by Allaah. The Prophet (peace and blessings of Allaah be upon him) said, as was narrated by Abu Hurayrah (may Allaah be pleased with him): “Avoid the seven sins that doom one to Hell.” They said: “O Messenger of Allaah, what are they?” He said: “Associating others with Allaah (shirk), witchcraft, killing a soul whom Allaah has forbidden us to kill, except when it is lawful, consuming riba, consuming the orphan’s wealth, running away from the battlefield, and slandering chaste believing women who never even think of anything touching their chastity (cf. al-Noor 24:23).” Narrated by al-Bukhaari, no. 2615; Muslim, 89.
As well as slandering that woman, you are also saying that you yourself committed zina, even if you are lying.
But if it is not a specific women, for example you said, “I did such and such with a woman,” and did not refer to a specific woman, then this is not regarded as slandering anyone, but you are still saying that you committed zina for which a hadd punishment is deserved, so you have to clear your own name.
It says in Badaa’i’ al-Sanaa’i’: If a person says, “I committed zina with a woman, but I do not know who she was,”, his confession is valid and he should be punished. Badaa’i’ al-Sanaa’i’, 7/51
2 – If it is a specific woman, but you have repented and regret what you did, part of your repentance is to tell others that you were lying, so you have to tell your cousin that you were not telling the truth, because you have to clear the name of that chaste woman. It is not permissible for you to give precedence to the friendship with your cousin by slandering the honour of a Muslim woman.
Ibn Qudaamah said in al-Mughni:
The apparent meaning of Ahmad’s words is that the repentance of the slanderer is to state that he was lying. So he should say, “I was lying when I said that.” This is the view of al-Shaafa’i. Ibn ‘Abd al-Barr said: Those who said that also include Sa’eed ibn al-Musayyib, ‘Ata’, Tawoos, al-Shu’bi, Ishaaq, Abu ‘Ubayd and Abu Thawr.
‘Abd al-Razzaaq narrated in al-Musannaf (5/77) that Tawoos said: His repentance (i.e., the one who accused someone of zina) is to say that he was lying.
3 – You should note that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever seeks the pleasure of Allaah by angering people, Allaah will suffice him against people, but whoever seeks to please people by angering Allaah, Allaah will leave him to the people.” Narrated by al-Tirmidhi, no. 2414; classed as saheeh by al-Albaani.
This hadeeth indicates that what you fear of a bad relationship between you and your cousin is an insignificant matter. Whoever obeys Allaah and seeks to please Him, Allaah will suffice him against people. So you should care more about your relationship with your Lord than your relationship with your cousin. Remember that this is one of the trials with which Allaah tests you, so do what is right and put your trust in Allaah, and do not fear the blame of anyone. Pray a great deal for forgiveness, repent and make du’aa’ to Allaah, asking him to make you steadfast in speaking the truth, and to reconcile you and your cousin, for the hearts of men are between two of the fingers of the Most Merciful, and He turns them however He wills. And Allaah knows best.