I do something similar to this. I put my savings into stocks, and then I can borrow against margin, using the stocks as backing. For what its worth, I never actually had to take a loan against margin yet. There are pros and cons:
Margin interest is cheap. Like, 3% APR cheap.
Margin interest starts being charged the second you open the loan, unlike credit cards.
The bottom line here is to use credit cards whenever you can, since paying off a credit card before the end of the month allows you to avoid paying interest. However, if some misfortune happens and you need money that you won't be paying back anytime soon, you'll want to take a margin loan, since 3% APR is better than 10+% APR, and you can keep your stocks in the market to help offset that interest.
However, stocks are risky. There are ways of mitigating the risk, but those ways also have pros and cons:
You can place a stop-loss order. It's a sell order that just sits on the market, and if the price of your stock drops below the amount written on the order, the order triggers and sells your stock. This works fine 95% of the time, but a lot of companies release earnings when the market is closed, which means that there's always a chance the stock will gap through your stop order. Stop orders can only execute when the market is open. If your stock opens far below your stop order, you can lose money in that "gap" between the previous day's close and that morning's open.
You can buy put options on your stock. Each put option contract you purchases insures 100 shares of the underlying stock against moving downwards below a specific price point (the strike price of the contract). However, options contracts themselves have to be purchased, which eats into your cost. They also have an expiration date. The longer until the expiration date you choose, the more you have to pay up front to purchase the option. It's a trade-off: you choose to lose a specific amount of money up front to dispel the possibility of losing a larger amount of money over a certain length of time. Of course, that possibility may never become reality, in which case your option expires worthless. For that reason, it's usually good practice to buy put options only when you suspect that your stock (or the market as a whole) is about to drop in value. Then again, you could just sell your stock instead.
The bottom line here is that investing is its own ball game. If you know how to invest your emergency fund, great. If not, just stick to a savings account. It takes a while to develop good investing skills. Nobody is born with a knowledge of how to choose good stocks and how to manage a stock portfolio, so it's only a good choice for people who already have stock market exposure.