The marriages and divorce under Hindu law are governed by the Hindu Marriage Act,1955. Two persons are said to be within the degrees of prohibited relationships: If the two are brother and sister; uncle and niece; Aunt and Nephew or children of brother and sister of two brothers or two sisters.
It must have been noticed in some communities the marriage with the wife of the brother and mother’s brother and the first cousins are solemnized, those marriages, in the absence of a custom in the community are not valid marriages. So, as per this if your custom allows the marriage between cousins then you can get married.
According to Hindu marriage act,1955 a person cannot marry up to his second cousin from the mother’s side and up to his fourth cousin from the side of the father. It is also necessary the parties should not be apindas of each other from either side.
Based on this you cannot marry your cousin even if you marry the marriage would be null and void according to Hindu marriage act,1955. The Hindu Marriage Act makes marriage between niece and uncle illegal for Hindus with the exception of marriages permitted by regional custom. If there is regional custom in your community and if they allow you to marry, then you can solemnize the marriage with your niece.
Reference: Hindu Marriage Act,1955