Liquidating your investment before maturity depends on the type of investment avenue that you have selected. Some investment plans might have a lock-in period within which liquidation is not possible. For instance, ULIPs have a lock-in period of 5 years while ELSS schemes have a lock-in of 3 years.
Under other investment plans, redemption before maturity might be allowed, but there may be a penalty clause. For instance, a premature withdrawal penalty may apply to fixed deposits if you liquidate the deposit before maturity.
Some investment plans do not have a fixed tenure and can be liquidated at any time. For instance, equity shares, equity mutual funds, gold, etc., can be redeemed whenever needed.